@galacean/engine-core 2.0.0-alpha.44 → 2.0.0-alpha.46
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 +105 -30
- package/dist/main.js.map +1 -1
- package/dist/module.js +105 -30
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
- package/types/2d/atlas/FontAtlas.d.ts +23 -1
- package/types/2d/atlas/SpriteAtlas.d.ts +8 -0
- package/types/2d/sprite/Sprite.d.ts +27 -1
- package/types/2d/sprite/SpriteMask.d.ts +43 -0
- package/types/2d/sprite/SpriteRenderer.d.ts +29 -0
- package/types/2d/text/CharInfo.d.ts +20 -1
- package/types/2d/text/CharRenderInfo.d.ts +15 -1
- package/types/2d/text/Font.d.ts +10 -0
- package/types/2d/text/SubFont.d.ts +35 -1
- package/types/2d/text/TextRenderer.d.ts +53 -0
- package/types/2d/text/TextUtils.d.ts +89 -1
- package/types/Background.d.ts +17 -0
- package/types/BasicResources.d.ts +52 -0
- package/types/Camera.d.ts +71 -1
- package/types/Canvas.d.ts +13 -0
- package/types/Component.d.ts +33 -0
- package/types/ComponentsDependencies.d.ts +38 -1
- package/types/ComponentsManager.d.ts +17 -0
- package/types/Engine.d.ts +106 -2
- package/types/Entity.d.ts +91 -1
- package/types/Polyfill.d.ts +12 -1
- package/types/RenderPipeline/BasicRenderPipeline.d.ts +3 -0
- package/types/RenderPipeline/BatcherManager.d.ts +23 -1
- package/types/RenderPipeline/CullingResults.d.ts +17 -1
- package/types/RenderPipeline/DepthOnlyPass.d.ts +18 -1
- package/types/RenderPipeline/InstanceBuffer.d.ts +28 -1
- package/types/RenderPipeline/MaskManager.d.ts +36 -1
- package/types/RenderPipeline/OpaqueTexturePass.d.ts +16 -1
- package/types/RenderPipeline/PipelineUtils.d.ts +11 -1
- package/types/RenderPipeline/PrimitiveChunk.d.ts +27 -1
- package/types/RenderPipeline/PrimitiveChunkManager.d.ts +16 -1
- package/types/RenderPipeline/RenderContext.d.ts +46 -1
- package/types/RenderPipeline/RenderElement.d.ts +9 -0
- package/types/RenderPipeline/RenderQueue.d.ts +23 -1
- package/types/RenderPipeline/RenderTargetPool.d.ts +17 -1
- package/types/RenderPipeline/SubPrimitiveChunk.d.ts +14 -1
- package/types/RenderPipeline/VertexArea.d.ts +10 -1
- package/types/RenderPipeline/VertexMergeBatcher.d.ts +11 -1
- package/types/RenderPipeline/enums/RenderQueueMaskType.d.ts +9 -1
- package/types/RenderPipeline/index.d.ts +2 -0
- package/types/Renderer.d.ts +58 -0
- package/types/Scene.d.ts +28 -0
- package/types/SceneManager.d.ts +13 -0
- package/types/Script.d.ts +40 -0
- package/types/SystemInfo.d.ts +10 -0
- package/types/Transform.d.ts +19 -0
- package/types/UpdateFlag.d.ts +3 -0
- package/types/UpdateFlagManager.d.ts +41 -1
- package/types/Utils.d.ts +20 -0
- package/types/VirtualCamera.d.ts +16 -1
- package/types/animation/AnimationClip.d.ts +5 -0
- package/types/animation/AnimationClipCurveBinding.d.ts +16 -1
- package/types/animation/Animator.d.ts +25 -0
- package/types/animation/AnimatorController.d.ts +17 -0
- package/types/animation/AnimatorControllerLayer.d.ts +9 -0
- package/types/animation/AnimatorControllerParameter.d.ts +4 -0
- package/types/animation/AnimatorState.d.ts +44 -0
- package/types/animation/AnimatorStateInstance.d.ts +8 -0
- package/types/animation/AnimatorStateMachine.d.ts +14 -0
- package/types/animation/AnimatorStateTransition.d.ts +9 -0
- package/types/animation/AnimatorStateTransitionCollection.d.ts +23 -1
- package/types/animation/StateMachineScript.d.ts +2 -0
- package/types/animation/animationCurve/AnimationArrayCurve.d.ts +39 -0
- package/types/animation/animationCurve/AnimationBoolCurve.d.ts +39 -0
- package/types/animation/animationCurve/AnimationColorCurve.d.ts +39 -0
- package/types/animation/animationCurve/AnimationCurve.d.ts +8 -0
- package/types/animation/animationCurve/AnimationFloatArrayCurve.d.ts +38 -0
- package/types/animation/animationCurve/AnimationFloatCurve.d.ts +39 -0
- package/types/animation/animationCurve/AnimationQuaternionCurve.d.ts +41 -0
- package/types/animation/animationCurve/AnimationRectCurve.d.ts +18 -0
- package/types/animation/animationCurve/AnimationRefCurve.d.ts +18 -0
- package/types/animation/animationCurve/AnimationStringCurve.d.ts +39 -0
- package/types/animation/animationCurve/AnimationVector2Curve.d.ts +39 -0
- package/types/animation/animationCurve/AnimationVector3Curve.d.ts +43 -0
- package/types/animation/animationCurve/AnimationVector4Curve.d.ts +39 -0
- package/types/animation/animationCurve/interfaces/IAnimationCurveCalculator.d.ts +18 -1
- package/types/animation/enums/AnimatorStatePlayState.d.ts +8 -1
- package/types/animation/internal/AnimationCurveLayerOwner.d.ts +15 -1
- package/types/animation/internal/AnimationEventHandler.d.ts +8 -1
- package/types/animation/internal/AnimatorLayerData.d.ts +28 -1
- package/types/animation/internal/AnimatorStateData.d.ts +14 -1
- package/types/animation/internal/AnimatorStatePlayData.d.ts +27 -1
- package/types/animation/internal/AnimatorTempValue.d.ts +12 -1
- package/types/animation/internal/animationCurveOwner/AnimationCurveOwner.d.ts +39 -0
- package/types/animation/internal/animationCurveOwner/assembler/BlendShapeWeightsAnimationCurveOwnerAssembler.d.ts +12 -1
- package/types/animation/internal/animationCurveOwner/assembler/IAnimationCurveOwnerAssembler.d.ts +10 -1
- package/types/animation/internal/animationCurveOwner/assembler/PositionAnimationCurveOwnerAssembler.d.ts +13 -1
- package/types/animation/internal/animationCurveOwner/assembler/RotationAnimationCurveOwnerAssembler.d.ts +13 -1
- package/types/animation/internal/animationCurveOwner/assembler/ScaleAnimationCurveOwnerAssembler.d.ts +13 -1
- package/types/animation/internal/animationCurveOwner/assembler/UniversalAnimationCurveOwnerAssembler.d.ts +23 -1
- package/types/asset/GraphicsResource.d.ts +10 -0
- package/types/asset/IReferable.d.ts +8 -0
- package/types/asset/ReferResource.d.ts +28 -0
- package/types/asset/RenderingStatistics.d.ts +8 -0
- package/types/asset/ResourceManager.d.ts +94 -4
- package/types/audio/AudioClip.d.ts +8 -0
- package/types/audio/AudioManager.d.ts +14 -0
- package/types/audio/AudioSource.d.ts +17 -0
- package/types/base/EngineObject.d.ts +4 -0
- package/types/base/Time.d.ts +13 -0
- package/types/clone/CloneDecorators.d.ts +20 -0
- package/types/clone/CloneUtil.d.ts +30 -1
- package/types/clone/ComponentCloner.d.ts +11 -1
- package/types/enums/CameraType.d.ts +9 -1
- package/types/env-probe/CubeProbe.d.ts +2 -0
- package/types/graphic/Buffer.d.ts +10 -0
- package/types/graphic/BufferUtil.d.ts +5 -0
- package/types/graphic/IndexBufferBinding.d.ts +4 -0
- package/types/graphic/Mesh.d.ts +54 -0
- package/types/graphic/Primitive.d.ts +50 -1
- package/types/graphic/TransformFeedback.d.ts +46 -1
- package/types/graphic/TransformFeedbackPrimitive.d.ts +67 -1
- package/types/graphic/TransformFeedbackSimulator.d.ts +55 -1
- package/types/graphic/VertexBufferBinding.d.ts +4 -0
- package/types/input/InputManager.d.ts +19 -0
- package/types/input/enums/PointerButton.d.ts +8 -0
- package/types/input/keyboard/KeyboardManager.d.ts +41 -1
- package/types/input/pointer/Pointer.d.ts +36 -0
- package/types/input/pointer/PointerEventData.d.ts +4 -0
- package/types/input/pointer/PointerManager.d.ts +58 -0
- package/types/input/pointer/emitter/IHitResult.d.ts +11 -1
- package/types/input/pointer/emitter/PhysicsPointerEventEmitter.d.ts +20 -1
- package/types/input/wheel/WheelManager.d.ts +34 -1
- package/types/lighting/AmbientLight.d.ts +9 -0
- package/types/lighting/DirectLight.d.ts +17 -0
- package/types/lighting/Light.d.ts +2 -0
- package/types/lighting/LightManager.d.ts +57 -0
- package/types/lighting/PointLight.d.ts +17 -0
- package/types/lighting/SpotLight.d.ts +17 -0
- package/types/lighting/ambientOcclusion/AmbientOcclusion.d.ts +4 -0
- package/types/lighting/ambientOcclusion/ScalableAmbientObscurancePass.d.ts +38 -1
- package/types/material/BaseMaterial.d.ts +4 -0
- package/types/material/Material.d.ts +2 -0
- package/types/mesh/BlendShape.d.ts +13 -0
- package/types/mesh/BlendShapeFrame.d.ts +7 -0
- package/types/mesh/BlendShapeManager.d.ts +101 -1
- package/types/mesh/MeshRenderer.d.ts +37 -0
- package/types/mesh/ModelMesh.d.ts +18 -0
- package/types/mesh/PrimitiveMesh.d.ts +28 -0
- package/types/mesh/PrimitiveMeshRestorer.d.ts +107 -0
- package/types/mesh/Skin.d.ts +10 -0
- package/types/mesh/SkinnedMeshRenderer.d.ts +21 -0
- package/types/particle/ParticleBufferUtils.d.ts +26 -1
- package/types/particle/ParticleGenerator.d.ts +102 -0
- package/types/particle/ParticleRenderer.d.ts +55 -0
- package/types/particle/ParticleTransformFeedbackSimulator.d.ts +52 -1
- package/types/particle/enums/ParticleRandomSubSeeds.d.ts +25 -1
- package/types/particle/enums/attributes/BillboardParticleVertexAttribute.d.ts +6 -1
- package/types/particle/enums/attributes/ParticleFeedbackVertexAttribute.d.ts +8 -1
- package/types/particle/enums/attributes/ParticleInstanceVertexAttribute.d.ts +17 -1
- package/types/particle/modules/ColorOverLifetimeModule.d.ts +12 -0
- package/types/particle/modules/CustomDataModule.d.ts +5 -0
- package/types/particle/modules/EmissionModule.d.ts +28 -0
- package/types/particle/modules/ForceOverLifetimeModule.d.ts +16 -1
- package/types/particle/modules/LimitVelocityOverLifetimeModule.d.ts +20 -1
- package/types/particle/modules/MainModule.d.ts +33 -1
- package/types/particle/modules/NoiseModule.d.ts +12 -1
- package/types/particle/modules/ParticleCompositeCurve.d.ts +37 -0
- package/types/particle/modules/ParticleCurve.d.ts +28 -0
- package/types/particle/modules/ParticleGeneratorModule.d.ts +7 -0
- package/types/particle/modules/ParticleGradient.d.ts +16 -0
- package/types/particle/modules/RotationOverLifetimeModule.d.ts +12 -0
- package/types/particle/modules/SizeOverLifetimeModule.d.ts +16 -0
- package/types/particle/modules/SubEmitter.d.ts +3 -0
- package/types/particle/modules/SubEmittersModule.d.ts +17 -0
- package/types/particle/modules/TextureSheetAnimationModule.d.ts +14 -1
- package/types/particle/modules/VelocityOverLifetimeModule.d.ts +28 -1
- package/types/particle/modules/shape/BaseShape.d.ts +33 -1
- package/types/particle/modules/shape/BoxShape.d.ts +13 -1
- package/types/particle/modules/shape/CircleShape.d.ts +13 -0
- package/types/particle/modules/shape/ConeShape.d.ts +13 -0
- package/types/particle/modules/shape/HemisphereShape.d.ts +13 -0
- package/types/particle/modules/shape/MeshShape.d.ts +17 -0
- package/types/particle/modules/shape/ShapeUtils.d.ts +13 -1
- package/types/particle/modules/shape/SphereShape.d.ts +13 -0
- package/types/physics/CharacterController.d.ts +21 -0
- package/types/physics/Collider.d.ts +39 -0
- package/types/physics/Collision.d.ts +3 -0
- package/types/physics/DynamicCollider.d.ts +14 -0
- package/types/physics/PhysicsMaterial.d.ts +3 -0
- package/types/physics/PhysicsScene.d.ts +51 -0
- package/types/physics/StaticCollider.d.ts +5 -0
- package/types/physics/enums/ColliderShapeChangeFlag.d.ts +8 -1
- package/types/physics/enums/HingeJointFlag.d.ts +14 -1
- package/types/physics/joint/HingeJoint.d.ts +4 -0
- package/types/physics/joint/Joint.d.ts +20 -0
- package/types/physics/joint/JointLimits.d.ts +3 -0
- package/types/physics/joint/JointMotor.d.ts +3 -0
- package/types/physics/shape/ColliderShape.d.ts +17 -0
- package/types/physics/shape/MeshColliderShape.d.ts +4 -0
- package/types/postProcess/FinalPass.d.ts +19 -1
- package/types/postProcess/PostProcess.d.ts +2 -0
- package/types/postProcess/PostProcessEffect.d.ts +4 -0
- package/types/postProcess/PostProcessEffectParameter.d.ts +4 -0
- package/types/postProcess/PostProcessManager.d.ts +43 -0
- package/types/postProcess/effects/BloomEffect.d.ts +25 -0
- package/types/postProcess/effects/TonemappingEffect.d.ts +3 -0
- package/types/renderingHardwareInterface/IPlatformTransformFeedback.d.ts +36 -1
- package/types/renderingHardwareInterface/IPlatformTransformFeedbackPrimitive.d.ts +40 -1
- package/types/shader/Shader.d.ts +22 -0
- package/types/shader/ShaderBlockProperty.d.ts +19 -1
- package/types/shader/ShaderData.d.ts +29 -0
- package/types/shader/ShaderFactory.d.ts +23 -0
- package/types/shader/ShaderMacro.d.ts +15 -0
- package/types/shader/ShaderMacroCollection.d.ts +57 -1
- package/types/shader/ShaderMacroProcessor.d.ts +72 -1
- package/types/shader/ShaderPass.d.ts +38 -0
- package/types/shader/ShaderProgram.d.ts +91 -1
- package/types/shader/ShaderProgramMap.d.ts +20 -1
- package/types/shader/ShaderProperty.d.ts +17 -0
- package/types/shader/ShaderTagKey.d.ts +2 -0
- package/types/shader/ShaderUniform.d.ts +49 -1
- package/types/shader/ShaderUniformBlock.d.ts +9 -1
- package/types/shader/enums/ConstantBufferBindingPoint.d.ts +7 -1
- package/types/shader/state/BlendState.d.ts +14 -0
- package/types/shader/state/DepthState.d.ts +14 -0
- package/types/shader/state/RasterState.d.ts +17 -0
- package/types/shader/state/RenderState.d.ts +11 -0
- package/types/shader/state/StencilState.d.ts +13 -0
- package/types/shadow/CascadedShadowCasterPass.d.ts +5 -0
- package/types/shadow/ShadowSliceData.d.ts +13 -1
- package/types/shadow/ShadowUtils.d.ts +43 -1
- package/types/sky/Sky.d.ts +9 -0
- package/types/texture/RenderTarget.d.ts +21 -0
- package/types/texture/Texture.d.ts +21 -0
- package/types/texture/Texture2D.d.ts +4 -0
- package/types/texture/Texture2DArray.d.ts +4 -0
- package/types/texture/TextureCube.d.ts +4 -0
- package/types/texture/TextureUtils.d.ts +16 -1
- package/types/trail/TrailRenderer.d.ts +5 -0
- package/types/ui/IUICanvas.d.ts +16 -1
- package/types/utils/DisorderedArray.d.ts +2 -0
- package/types/xr/XRManager.d.ts +28 -0
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
* Rendering statistics.
|
|
3
3
|
*/
|
|
4
4
|
export declare class RenderingStatistics {
|
|
5
|
+
/** @internal */
|
|
6
|
+
_textureMemory: number;
|
|
7
|
+
/** @internal */
|
|
8
|
+
_bufferMemory: number;
|
|
5
9
|
/**
|
|
6
10
|
* Memory used by all textures, in bytes.
|
|
7
11
|
*/
|
|
@@ -14,4 +18,8 @@ export declare class RenderingStatistics {
|
|
|
14
18
|
* Total memory used, in bytes.
|
|
15
19
|
*/
|
|
16
20
|
get totalMemory(): number;
|
|
21
|
+
/**
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
24
|
+
_reset(): void;
|
|
17
25
|
}
|
|
@@ -1,13 +1,26 @@
|
|
|
1
1
|
import { ContentRestorer, Engine, EngineObject } from "..";
|
|
2
|
+
import type { Shader } from "../shader/Shader";
|
|
2
3
|
import { AssetPromise } from "./AssetPromise";
|
|
4
|
+
import { GraphicsResource } from "./GraphicsResource";
|
|
3
5
|
import { Loader } from "./Loader";
|
|
4
6
|
import { LoadItem } from "./LoadItem";
|
|
7
|
+
import { ReferResource } from "./ReferResource";
|
|
8
|
+
import { RequestConfig } from "./request";
|
|
9
|
+
type LoadableResource = EngineObject | Shader;
|
|
5
10
|
/**
|
|
6
11
|
* ResourceManager
|
|
7
12
|
*/
|
|
8
13
|
export declare class ResourceManager {
|
|
9
14
|
readonly engine: Engine;
|
|
15
|
+
/** @internal */
|
|
16
|
+
static _loaders: {
|
|
17
|
+
[key: string]: Loader<any>;
|
|
18
|
+
};
|
|
10
19
|
private static _extTypeMapping;
|
|
20
|
+
/**
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
23
|
+
static _addLoader(type: string, loader: Loader<any>, extNames: string[]): void;
|
|
11
24
|
private static _getTypeByUrl;
|
|
12
25
|
/** The number of retries after failing to load assets. */
|
|
13
26
|
retryCount: number;
|
|
@@ -39,25 +52,25 @@ export declare class ResourceManager {
|
|
|
39
52
|
* @param assetItem - AssetItem
|
|
40
53
|
* @returns AssetPromise
|
|
41
54
|
*/
|
|
42
|
-
load<T extends
|
|
55
|
+
load<T extends LoadableResource>(assetItem: LoadItem): AssetPromise<T>;
|
|
43
56
|
/**
|
|
44
57
|
* Load the asset collection asynchronously by loading the information collection.
|
|
45
58
|
* @param assetItems - Asset collection
|
|
46
59
|
* @returns AssetPromise
|
|
47
60
|
*/
|
|
48
|
-
load<T extends
|
|
61
|
+
load<T extends LoadableResource[]>(assetItems: LoadItem[]): AssetPromise<T>;
|
|
49
62
|
/**
|
|
50
63
|
* Load asset collection asynchronously through urls.
|
|
51
64
|
* @param paths - Path collections
|
|
52
65
|
* @returns Asset Promise
|
|
53
66
|
*/
|
|
54
|
-
load<T extends
|
|
67
|
+
load<T extends LoadableResource[]>(paths: string[]): AssetPromise<T>;
|
|
55
68
|
/**
|
|
56
69
|
* Load asset asynchronously through the path.
|
|
57
70
|
* @param path - Path
|
|
58
71
|
* @returns Asset promise
|
|
59
72
|
*/
|
|
60
|
-
load<T extends
|
|
73
|
+
load<T extends LoadableResource>(path: string): AssetPromise<T>;
|
|
61
74
|
/**
|
|
62
75
|
* Get the resource from cache by asset url, return the resource object if it loaded, otherwise return null.
|
|
63
76
|
* @param url - Resource URL
|
|
@@ -100,6 +113,66 @@ export declare class ResourceManager {
|
|
|
100
113
|
* @param restorer - The restorer
|
|
101
114
|
*/
|
|
102
115
|
addContentRestorer<T extends EngineObject>(restorer: ContentRestorer<T>): void;
|
|
116
|
+
/**
|
|
117
|
+
* @internal
|
|
118
|
+
*/
|
|
119
|
+
_getRemoteUrl(url: string): string;
|
|
120
|
+
/**
|
|
121
|
+
* @internal
|
|
122
|
+
*/
|
|
123
|
+
_requestByRemoteUrl<T>(url: string, config: RequestConfig): AssetPromise<T>;
|
|
124
|
+
/**
|
|
125
|
+
* @internal
|
|
126
|
+
*/
|
|
127
|
+
_request<T>(url: string, config: RequestConfig): AssetPromise<T>;
|
|
128
|
+
/**
|
|
129
|
+
* @internal
|
|
130
|
+
*/
|
|
131
|
+
_onSubAssetSuccess<T>(remoteAssetBaseURL: string, assetSubPath: string, value: T): void;
|
|
132
|
+
/**
|
|
133
|
+
* @internal
|
|
134
|
+
*/
|
|
135
|
+
_addAsset(path: string, asset: EngineObject): void;
|
|
136
|
+
/**
|
|
137
|
+
* @internal
|
|
138
|
+
*/
|
|
139
|
+
_deleteAsset(asset: EngineObject): void;
|
|
140
|
+
/**
|
|
141
|
+
* @internal
|
|
142
|
+
*/
|
|
143
|
+
_addReferResource(resource: ReferResource): void;
|
|
144
|
+
/**
|
|
145
|
+
* @internal
|
|
146
|
+
*/
|
|
147
|
+
_deleteReferResource(resource: EngineObject): void;
|
|
148
|
+
/**
|
|
149
|
+
* @internal
|
|
150
|
+
*/
|
|
151
|
+
_addGraphicResource(resource: GraphicsResource): void;
|
|
152
|
+
/**
|
|
153
|
+
* @internal
|
|
154
|
+
*/
|
|
155
|
+
_deleteGraphicResource(resource: EngineObject): void;
|
|
156
|
+
/**
|
|
157
|
+
* @internal
|
|
158
|
+
*/
|
|
159
|
+
_deleteContentRestorer(resource: EngineObject): void;
|
|
160
|
+
/**
|
|
161
|
+
* @internal
|
|
162
|
+
*/
|
|
163
|
+
_restoreGraphicResources(): void;
|
|
164
|
+
/**
|
|
165
|
+
* @internal
|
|
166
|
+
*/
|
|
167
|
+
_lostGraphicResources(): void;
|
|
168
|
+
/**
|
|
169
|
+
* @internal
|
|
170
|
+
*/
|
|
171
|
+
_restoreResourcesContent(): Promise<void[]>;
|
|
172
|
+
/**
|
|
173
|
+
* @internal
|
|
174
|
+
*/
|
|
175
|
+
_destroy(): void;
|
|
103
176
|
private _resolveLoadItemOptions;
|
|
104
177
|
private _loadSingleItem;
|
|
105
178
|
private _loadSubpackageAndMainAsset;
|
|
@@ -112,12 +185,27 @@ export declare class ResourceManager {
|
|
|
112
185
|
private _parseURL;
|
|
113
186
|
private _parseQueryPath;
|
|
114
187
|
private _releaseSubAssetPromiseCallback;
|
|
188
|
+
/** @internal */
|
|
189
|
+
_objectPool: {
|
|
190
|
+
[key: string]: any;
|
|
191
|
+
};
|
|
192
|
+
/** @internal */
|
|
193
|
+
_virtualPathResourceMap: Record<VirtualPath, VirtualResource>;
|
|
115
194
|
/**
|
|
116
195
|
* Register virtual asset paths and their load descriptors.
|
|
117
196
|
* @remarks References inside runtime scenes and Prefabs can keep stable virtual paths while the backing URLs
|
|
118
197
|
* are generated dynamically, such as object URLs created from a resource package.
|
|
119
198
|
*/
|
|
120
199
|
registerVirtualResources(resources: readonly VirtualResource[]): void;
|
|
200
|
+
/**
|
|
201
|
+
* @internal
|
|
202
|
+
* @beta Just for internal editor, not recommended for developers.
|
|
203
|
+
*/
|
|
204
|
+
getResourceByRef<T extends LoadableResource>(ref: {
|
|
205
|
+
url: string;
|
|
206
|
+
key?: string;
|
|
207
|
+
isClone?: boolean;
|
|
208
|
+
}): AssetPromise<T | null>;
|
|
121
209
|
}
|
|
122
210
|
/**
|
|
123
211
|
* Declare ResourceLoader's decorator.
|
|
@@ -127,6 +215,7 @@ export declare class ResourceManager {
|
|
|
127
215
|
export declare function resourceLoader(assetType: string, extNames: string[], useCache?: boolean): <T extends Loader<any>>(Target: {
|
|
128
216
|
new (useCache: boolean): T;
|
|
129
217
|
}) => void;
|
|
218
|
+
type VirtualPath = string;
|
|
130
219
|
export interface VirtualResource {
|
|
131
220
|
virtualPath: string;
|
|
132
221
|
path: string;
|
|
@@ -137,3 +226,4 @@ export interface VirtualResource {
|
|
|
137
226
|
subpackageName?: string;
|
|
138
227
|
params?: Record<string, any>;
|
|
139
228
|
}
|
|
229
|
+
export {};
|
|
@@ -20,5 +20,13 @@ export declare class AudioClip extends ReferResource {
|
|
|
20
20
|
*/
|
|
21
21
|
get duration(): number;
|
|
22
22
|
constructor(engine: Engine, name?: string);
|
|
23
|
+
/**
|
|
24
|
+
* @internal
|
|
25
|
+
*/
|
|
26
|
+
_getAudioSource(): AudioBuffer;
|
|
27
|
+
/**
|
|
28
|
+
* @internal
|
|
29
|
+
*/
|
|
30
|
+
_setAudioSource(value: AudioBuffer): void;
|
|
23
31
|
protected _onDestroy(): void;
|
|
24
32
|
}
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
* Audio Manager for managing global audio context and settings.
|
|
3
3
|
*/
|
|
4
4
|
export declare class AudioManager {
|
|
5
|
+
/** @internal */
|
|
6
|
+
static _playingCount: number;
|
|
5
7
|
private static _context;
|
|
6
8
|
private static _gainNode;
|
|
7
9
|
private static _resumePromise;
|
|
@@ -19,6 +21,18 @@ export declare class AudioManager {
|
|
|
19
21
|
* @returns A promise that resolves when the audio context is resumed
|
|
20
22
|
*/
|
|
21
23
|
static resume(): Promise<void>;
|
|
24
|
+
/**
|
|
25
|
+
* @internal
|
|
26
|
+
*/
|
|
27
|
+
static getContext(): AudioContext;
|
|
28
|
+
/**
|
|
29
|
+
* @internal
|
|
30
|
+
*/
|
|
31
|
+
static getGainNode(): GainNode;
|
|
32
|
+
/**
|
|
33
|
+
* @internal
|
|
34
|
+
*/
|
|
35
|
+
static isAudioContextRunning(): boolean;
|
|
22
36
|
private static _onVisibilityChange;
|
|
23
37
|
private static _recoverPlaybackContext;
|
|
24
38
|
private static _onPageShow;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Component } from "../Component";
|
|
2
|
+
import { Entity } from "../Entity";
|
|
2
3
|
import { AudioClip } from "./AudioClip";
|
|
3
4
|
/**
|
|
4
5
|
* Audio Source Component.
|
|
@@ -54,6 +55,10 @@ export declare class AudioSource extends Component {
|
|
|
54
55
|
* Playback position in seconds.
|
|
55
56
|
*/
|
|
56
57
|
get time(): number;
|
|
58
|
+
/**
|
|
59
|
+
* @internal
|
|
60
|
+
*/
|
|
61
|
+
constructor(entity: Entity);
|
|
57
62
|
/**
|
|
58
63
|
* Play the clip.
|
|
59
64
|
*/
|
|
@@ -66,6 +71,18 @@ export declare class AudioSource extends Component {
|
|
|
66
71
|
* Pauses playing the clip.
|
|
67
72
|
*/
|
|
68
73
|
pause(): void;
|
|
74
|
+
/**
|
|
75
|
+
* @internal
|
|
76
|
+
*/
|
|
77
|
+
_onEnable(): void;
|
|
78
|
+
/**
|
|
79
|
+
* @internal
|
|
80
|
+
*/
|
|
81
|
+
_onDisable(): void;
|
|
82
|
+
/**
|
|
83
|
+
* @internal
|
|
84
|
+
*/
|
|
85
|
+
protected _onDestroy(): void;
|
|
69
86
|
private _onPlayEnd;
|
|
70
87
|
private _ensureGainNode;
|
|
71
88
|
private _startPlayback;
|
|
@@ -5,6 +5,10 @@ import { Engine } from "../Engine";
|
|
|
5
5
|
export declare class EngineObject {
|
|
6
6
|
private static _instanceIdCounter;
|
|
7
7
|
readonly instanceId: number;
|
|
8
|
+
/** @internal */
|
|
9
|
+
_engine: Engine;
|
|
10
|
+
/** @internal */
|
|
11
|
+
_pendingDestroy: boolean;
|
|
8
12
|
protected _destroyed: boolean;
|
|
9
13
|
/**
|
|
10
14
|
* Get the engine which the object belongs.
|
package/types/base/Time.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ShaderData } from "../shader/ShaderData";
|
|
1
2
|
/**
|
|
2
3
|
* Provide time related information.
|
|
3
4
|
*/
|
|
@@ -41,4 +42,16 @@ export declare class Time {
|
|
|
41
42
|
* Constructor of the Time.
|
|
42
43
|
*/
|
|
43
44
|
constructor();
|
|
45
|
+
/**
|
|
46
|
+
* @internal
|
|
47
|
+
*/
|
|
48
|
+
_reset(): void;
|
|
49
|
+
/**
|
|
50
|
+
* @internal
|
|
51
|
+
*/
|
|
52
|
+
_update(): void;
|
|
53
|
+
/**
|
|
54
|
+
* @internal
|
|
55
|
+
*/
|
|
56
|
+
_updateSceneShaderData(shaderData: ShaderData): void;
|
|
44
57
|
}
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
/** @internal */
|
|
2
|
+
export declare const defaultCloneModeKey: unique symbol;
|
|
3
|
+
/** @internal */
|
|
4
|
+
export declare const fieldCloneModesKey: unique symbol;
|
|
5
|
+
/**
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export declare const enum CloneMode {
|
|
9
|
+
Ignore = 0,
|
|
10
|
+
Assignment = 1,
|
|
11
|
+
Remap = 2,
|
|
12
|
+
Copy = 3,
|
|
13
|
+
Deep = 4
|
|
14
|
+
}
|
|
1
15
|
/**
|
|
2
16
|
* Property decorator — deep clone this field's whole subtree, overriding the value type's default
|
|
3
17
|
* clone mode (field-level decorators have the highest priority). The deep intent carries into
|
|
@@ -15,3 +29,9 @@ export declare function assignmentClone(target: object, propertyKey: string): vo
|
|
|
15
29
|
* Property decorator — ignore this field when cloning; keep the clone's own constructor-built value.
|
|
16
30
|
*/
|
|
17
31
|
export declare function ignoreClone(target: object, propertyKey: string): void;
|
|
32
|
+
/**
|
|
33
|
+
* @internal
|
|
34
|
+
*/
|
|
35
|
+
export declare function registerDefaultCloneMode(target: {
|
|
36
|
+
prototype: object;
|
|
37
|
+
}, mode: CloneMode): void;
|
|
@@ -1 +1,30 @@
|
|
|
1
|
-
|
|
1
|
+
import { CloneMode } from "./CloneDecorators";
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export declare class CloneUtil {
|
|
6
|
+
/**
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
static _cloneObjectFields(source: any, target: object, cloneMap: Map<object, object>, deepCloneSubtree?: boolean): void;
|
|
10
|
+
/**
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
static _cloneFieldValue(source: any, preset: any, cloneMap: Map<object, object>, fieldMode?: CloneMode, deepCloneSubtree?: boolean): any;
|
|
14
|
+
/**
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
static _transferSlotOwnership(cloned: any, source: any, preset: any): void;
|
|
18
|
+
private static _cloneValueForDeepField;
|
|
19
|
+
private static _cloneValueByDefault;
|
|
20
|
+
private static _cloneCopyFromValue;
|
|
21
|
+
private static _cloneObjectByFields;
|
|
22
|
+
private static _createCloneTarget;
|
|
23
|
+
private static _deepCloneArrayBufferView;
|
|
24
|
+
private static _cloneArray;
|
|
25
|
+
private static _cloneMap;
|
|
26
|
+
private static _cloneSet;
|
|
27
|
+
private static _isPlainObject;
|
|
28
|
+
private static _hasOrdinaryObjectTag;
|
|
29
|
+
private static _getTypeName;
|
|
30
|
+
}
|
|
@@ -1 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
import { Component } from "../Component";
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
* Clones component fields and runs the component's post-clone hook.
|
|
5
|
+
*/
|
|
6
|
+
export declare class ComponentCloner {
|
|
7
|
+
/**
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
static cloneComponent(source: Component, target: Component, cloneMap: Map<object, object>): void;
|
|
11
|
+
}
|
|
@@ -9,6 +9,8 @@ export declare class CubeProbe extends Probe {
|
|
|
9
9
|
* The position of the probe can be set, the default is the origin [0,0,0].
|
|
10
10
|
*/
|
|
11
11
|
position: Vector3;
|
|
12
|
+
/** @internal */
|
|
13
|
+
protected readonly _isCube: boolean;
|
|
12
14
|
private oriViewMatrix;
|
|
13
15
|
private _oriFieldOfView;
|
|
14
16
|
onBeginRender(camera: Camera): void;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { GraphicsResource } from "../asset/GraphicsResource";
|
|
2
2
|
import { Engine } from "../Engine";
|
|
3
|
+
import { IPlatformBuffer } from "../renderingHardwareInterface";
|
|
4
|
+
import { UpdateFlagManager } from "../UpdateFlagManager";
|
|
3
5
|
import { BufferBindFlag } from "./enums/BufferBindFlag";
|
|
4
6
|
import { BufferUsage } from "./enums/BufferUsage";
|
|
5
7
|
import { SetDataOptions } from "./enums/SetDataOptions";
|
|
@@ -7,6 +9,10 @@ import { SetDataOptions } from "./enums/SetDataOptions";
|
|
|
7
9
|
* Buffer.
|
|
8
10
|
*/
|
|
9
11
|
export declare class Buffer extends GraphicsResource {
|
|
12
|
+
/** @internal */
|
|
13
|
+
_dataUpdateManager: UpdateFlagManager;
|
|
14
|
+
/** @internal */
|
|
15
|
+
_platformBuffer: IPlatformBuffer;
|
|
10
16
|
private _type;
|
|
11
17
|
private _byteLength;
|
|
12
18
|
private _bufferUsage;
|
|
@@ -118,4 +124,8 @@ export declare class Buffer extends GraphicsResource {
|
|
|
118
124
|
*/
|
|
119
125
|
markAsUnreadable(): void;
|
|
120
126
|
_rebuild(): void;
|
|
127
|
+
/**
|
|
128
|
+
* @internal
|
|
129
|
+
*/
|
|
130
|
+
protected _onDestroy(): void;
|
|
121
131
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DataType } from "../base/Constant";
|
|
2
2
|
import { IndexFormat } from "./enums/IndexFormat";
|
|
3
|
+
import { VertexElementFormat } from "./enums/VertexElementFormat";
|
|
3
4
|
export interface ElementInfo {
|
|
4
5
|
size: number;
|
|
5
6
|
type: DataType;
|
|
@@ -9,4 +10,8 @@ export interface ElementInfo {
|
|
|
9
10
|
export declare class BufferUtil {
|
|
10
11
|
static _getGLIndexType(indexFormat: IndexFormat): DataType;
|
|
11
12
|
static _getGLIndexByteCount(indexFormat: IndexFormat): number;
|
|
13
|
+
/**
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
static _getElementInfo(format: VertexElementFormat): ElementInfo;
|
|
12
17
|
}
|
package/types/graphic/Mesh.d.ts
CHANGED
|
@@ -1,14 +1,23 @@
|
|
|
1
1
|
import { BoundingBox } from "@galacean/engine-math";
|
|
2
2
|
import { Engine } from "../Engine";
|
|
3
|
+
import { UpdateFlagManager } from "../UpdateFlagManager";
|
|
3
4
|
import { ReferResource } from "../asset/ReferResource";
|
|
5
|
+
import { IndexBufferBinding } from "../graphic/IndexBufferBinding";
|
|
4
6
|
import { SubMesh } from "../graphic/SubMesh";
|
|
7
|
+
import { VertexBufferBinding } from "../graphic/VertexBufferBinding";
|
|
8
|
+
import { VertexElement } from "../graphic/VertexElement";
|
|
5
9
|
import { MeshTopology } from "../graphic/enums/MeshTopology";
|
|
10
|
+
import { Primitive } from "./Primitive";
|
|
6
11
|
/**
|
|
7
12
|
* Mesh.
|
|
8
13
|
*/
|
|
9
14
|
export declare abstract class Mesh extends ReferResource {
|
|
10
15
|
/** Name. */
|
|
11
16
|
name: string;
|
|
17
|
+
/** @internal */
|
|
18
|
+
_primitive: Primitive;
|
|
19
|
+
/** @internal */
|
|
20
|
+
_updateFlagManager: UpdateFlagManager;
|
|
12
21
|
private _bounds;
|
|
13
22
|
private _subMeshes;
|
|
14
23
|
/**
|
|
@@ -53,6 +62,51 @@ export declare abstract class Mesh extends ReferResource {
|
|
|
53
62
|
* Clear all sub-mesh.
|
|
54
63
|
*/
|
|
55
64
|
clearSubMesh(): void;
|
|
65
|
+
/**
|
|
66
|
+
* @internal
|
|
67
|
+
*/
|
|
68
|
+
_clearVertexElements(): void;
|
|
69
|
+
/**
|
|
70
|
+
* @internal
|
|
71
|
+
*/
|
|
72
|
+
_addVertexElement(element: VertexElement): void;
|
|
73
|
+
/**
|
|
74
|
+
* @internal
|
|
75
|
+
*/
|
|
76
|
+
_removeVertexElement(index: number): void;
|
|
77
|
+
/**
|
|
78
|
+
* @internal
|
|
79
|
+
* @remarks should use together with `_setVertexElementsLength`
|
|
80
|
+
*/
|
|
81
|
+
_setVertexElement(index: number, element: VertexElement): void;
|
|
82
|
+
/**
|
|
83
|
+
* @internal
|
|
84
|
+
*
|
|
85
|
+
*/
|
|
86
|
+
_setVertexElementsLength(length: number): void;
|
|
87
|
+
/**
|
|
88
|
+
* @internal
|
|
89
|
+
*/
|
|
90
|
+
_setVertexBufferBinding(index: number, binding: VertexBufferBinding): void;
|
|
56
91
|
_addReferCount(value: number): void;
|
|
92
|
+
/**
|
|
93
|
+
* @internal
|
|
94
|
+
*/
|
|
95
|
+
protected _onDestroy(): void;
|
|
96
|
+
/**
|
|
97
|
+
* @internal
|
|
98
|
+
*/
|
|
99
|
+
protected _setVertexElements(elements: VertexElement[]): void;
|
|
100
|
+
/**
|
|
101
|
+
* @internal
|
|
102
|
+
*/
|
|
103
|
+
protected _setIndexBufferBinding(binding: IndexBufferBinding | null): void;
|
|
57
104
|
private _onBoundsChanged;
|
|
58
105
|
}
|
|
106
|
+
/**
|
|
107
|
+
* @internal
|
|
108
|
+
*/
|
|
109
|
+
export declare enum MeshModifyFlags {
|
|
110
|
+
Bounds = 1,
|
|
111
|
+
VertexElements = 2
|
|
112
|
+
}
|
|
@@ -1 +1,50 @@
|
|
|
1
|
-
|
|
1
|
+
import { Engine } from "../Engine";
|
|
2
|
+
import { GraphicsResource } from "../asset/GraphicsResource";
|
|
3
|
+
import { ShaderProgram } from "../shader/ShaderProgram";
|
|
4
|
+
import { IndexBufferBinding } from "./IndexBufferBinding";
|
|
5
|
+
import { SubPrimitive } from "./SubPrimitive";
|
|
6
|
+
import { VertexBufferBinding } from "./VertexBufferBinding";
|
|
7
|
+
import { VertexElement } from "./VertexElement";
|
|
8
|
+
/**
|
|
9
|
+
* @internal
|
|
10
|
+
* Primitive.
|
|
11
|
+
*/
|
|
12
|
+
export declare class Primitive extends GraphicsResource {
|
|
13
|
+
enableVAO: boolean;
|
|
14
|
+
instanceCount: number;
|
|
15
|
+
vertexBufferBindings: VertexBufferBinding[];
|
|
16
|
+
/** @internal */
|
|
17
|
+
_vertexElementMap: Record<string, VertexElement>;
|
|
18
|
+
/** @internal */
|
|
19
|
+
_glIndexType: number;
|
|
20
|
+
/** @internal */
|
|
21
|
+
_glIndexByteCount: number;
|
|
22
|
+
/** @internal */
|
|
23
|
+
_bufferStructChanged: boolean;
|
|
24
|
+
private _vertexElements;
|
|
25
|
+
private _indexBufferBinding;
|
|
26
|
+
private _platformPrimitive;
|
|
27
|
+
get vertexElements(): VertexElement[];
|
|
28
|
+
get indexBufferBinding(): IndexBufferBinding;
|
|
29
|
+
constructor(engine: Engine);
|
|
30
|
+
addVertexElement(element: VertexElement): void;
|
|
31
|
+
removeVertexElement(index: number): void;
|
|
32
|
+
clearVertexElements(): void;
|
|
33
|
+
/**
|
|
34
|
+
* @remarks should use together with `setVertexElementsLength`
|
|
35
|
+
*/
|
|
36
|
+
setVertexElement(index: number, element: VertexElement): void;
|
|
37
|
+
setVertexElementsLength(length: number): void;
|
|
38
|
+
setVertexBufferBinding(index: number, binding: VertexBufferBinding): void;
|
|
39
|
+
/**
|
|
40
|
+
* Set vertex buffer binding.
|
|
41
|
+
* @param vertexBufferBindings - Vertex buffer binding
|
|
42
|
+
* @param firstIndex - First vertex buffer index, the default value is 0
|
|
43
|
+
*/
|
|
44
|
+
setVertexBufferBindings(vertexBufferBindings: VertexBufferBinding[], firstIndex?: number): void;
|
|
45
|
+
setIndexBufferBinding(binding: IndexBufferBinding | null): void;
|
|
46
|
+
draw(shaderProgram: ShaderProgram, subMesh: SubPrimitive): void;
|
|
47
|
+
_addReferCount(value: number): void;
|
|
48
|
+
_rebuild(): void;
|
|
49
|
+
protected _onDestroy(): void;
|
|
50
|
+
}
|
|
@@ -1 +1,46 @@
|
|
|
1
|
-
|
|
1
|
+
import { GraphicsResource } from "../asset/GraphicsResource";
|
|
2
|
+
import { Engine } from "../Engine";
|
|
3
|
+
import { IPlatformTransformFeedback } from "../renderingHardwareInterface";
|
|
4
|
+
import { Buffer } from "./Buffer";
|
|
5
|
+
import { MeshTopology } from "./enums/MeshTopology";
|
|
6
|
+
/**
|
|
7
|
+
* Transform Feedback object for GPU-based data capture.
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export declare class TransformFeedback extends GraphicsResource {
|
|
11
|
+
/** @internal */
|
|
12
|
+
_platformTransformFeedback: IPlatformTransformFeedback;
|
|
13
|
+
constructor(engine: Engine);
|
|
14
|
+
/**
|
|
15
|
+
* Bind this Transform Feedback object as active.
|
|
16
|
+
*/
|
|
17
|
+
bind(): void;
|
|
18
|
+
/**
|
|
19
|
+
* Bind a buffer range as output at the given index.
|
|
20
|
+
* @param index - Output binding point index (corresponds to varying index in shader)
|
|
21
|
+
* @param buffer - Output buffer to capture data into
|
|
22
|
+
* @param byteOffset - Starting byte offset in the buffer
|
|
23
|
+
* @param byteSize - Size in bytes of the capture range
|
|
24
|
+
*/
|
|
25
|
+
bindBufferRange(index: number, buffer: Buffer, byteOffset: number, byteSize: number): void;
|
|
26
|
+
/**
|
|
27
|
+
* Begin a Transform Feedback pass.
|
|
28
|
+
* @param primitiveMode - Primitive topology mode
|
|
29
|
+
*/
|
|
30
|
+
begin(primitiveMode: MeshTopology): void;
|
|
31
|
+
/**
|
|
32
|
+
* End the current Transform Feedback pass.
|
|
33
|
+
*/
|
|
34
|
+
end(): void;
|
|
35
|
+
/**
|
|
36
|
+
* Unbind the output buffer at the given index from the Transform Feedback target.
|
|
37
|
+
* @param index - Output binding point index
|
|
38
|
+
*/
|
|
39
|
+
unbindBuffer(index: number): void;
|
|
40
|
+
/**
|
|
41
|
+
* Unbind this Transform Feedback object.
|
|
42
|
+
*/
|
|
43
|
+
unbind(): void;
|
|
44
|
+
_rebuild(): void;
|
|
45
|
+
protected _onDestroy(): void;
|
|
46
|
+
}
|