@galacean/engine-core 2.0.0-alpha.44 → 2.0.0-alpha.45

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.
Files changed (236) hide show
  1. package/dist/main.js.map +1 -1
  2. package/dist/module.js.map +1 -1
  3. package/package.json +3 -3
  4. package/types/2d/atlas/FontAtlas.d.ts +23 -1
  5. package/types/2d/atlas/SpriteAtlas.d.ts +8 -0
  6. package/types/2d/sprite/Sprite.d.ts +27 -1
  7. package/types/2d/sprite/SpriteMask.d.ts +43 -0
  8. package/types/2d/sprite/SpriteRenderer.d.ts +29 -0
  9. package/types/2d/text/CharInfo.d.ts +20 -1
  10. package/types/2d/text/CharRenderInfo.d.ts +15 -1
  11. package/types/2d/text/Font.d.ts +10 -0
  12. package/types/2d/text/SubFont.d.ts +35 -1
  13. package/types/2d/text/TextRenderer.d.ts +53 -0
  14. package/types/2d/text/TextUtils.d.ts +89 -1
  15. package/types/Background.d.ts +17 -0
  16. package/types/BasicResources.d.ts +52 -0
  17. package/types/Camera.d.ts +71 -1
  18. package/types/Canvas.d.ts +13 -0
  19. package/types/Component.d.ts +33 -0
  20. package/types/ComponentsDependencies.d.ts +34 -1
  21. package/types/ComponentsManager.d.ts +17 -0
  22. package/types/Engine.d.ts +106 -2
  23. package/types/Entity.d.ts +88 -0
  24. package/types/Polyfill.d.ts +12 -1
  25. package/types/RenderPipeline/BasicRenderPipeline.d.ts +3 -0
  26. package/types/RenderPipeline/BatcherManager.d.ts +23 -1
  27. package/types/RenderPipeline/CullingResults.d.ts +17 -1
  28. package/types/RenderPipeline/DepthOnlyPass.d.ts +18 -1
  29. package/types/RenderPipeline/InstanceBuffer.d.ts +28 -1
  30. package/types/RenderPipeline/MaskManager.d.ts +36 -1
  31. package/types/RenderPipeline/OpaqueTexturePass.d.ts +16 -1
  32. package/types/RenderPipeline/PipelineUtils.d.ts +11 -1
  33. package/types/RenderPipeline/PrimitiveChunk.d.ts +27 -1
  34. package/types/RenderPipeline/PrimitiveChunkManager.d.ts +16 -1
  35. package/types/RenderPipeline/RenderContext.d.ts +46 -1
  36. package/types/RenderPipeline/RenderElement.d.ts +9 -0
  37. package/types/RenderPipeline/RenderQueue.d.ts +23 -1
  38. package/types/RenderPipeline/RenderTargetPool.d.ts +17 -1
  39. package/types/RenderPipeline/SubPrimitiveChunk.d.ts +14 -1
  40. package/types/RenderPipeline/VertexArea.d.ts +10 -1
  41. package/types/RenderPipeline/VertexMergeBatcher.d.ts +11 -1
  42. package/types/RenderPipeline/enums/RenderQueueMaskType.d.ts +9 -1
  43. package/types/RenderPipeline/index.d.ts +2 -0
  44. package/types/Renderer.d.ts +58 -0
  45. package/types/Scene.d.ts +28 -0
  46. package/types/SceneManager.d.ts +13 -0
  47. package/types/Script.d.ts +40 -0
  48. package/types/SystemInfo.d.ts +10 -0
  49. package/types/Transform.d.ts +13 -0
  50. package/types/UpdateFlag.d.ts +3 -0
  51. package/types/UpdateFlagManager.d.ts +41 -1
  52. package/types/Utils.d.ts +20 -0
  53. package/types/VirtualCamera.d.ts +16 -1
  54. package/types/animation/AnimationClip.d.ts +5 -0
  55. package/types/animation/AnimationClipCurveBinding.d.ts +16 -1
  56. package/types/animation/Animator.d.ts +25 -0
  57. package/types/animation/AnimatorController.d.ts +17 -0
  58. package/types/animation/AnimatorControllerLayer.d.ts +9 -0
  59. package/types/animation/AnimatorControllerParameter.d.ts +4 -0
  60. package/types/animation/AnimatorState.d.ts +44 -0
  61. package/types/animation/AnimatorStateInstance.d.ts +8 -0
  62. package/types/animation/AnimatorStateMachine.d.ts +14 -0
  63. package/types/animation/AnimatorStateTransition.d.ts +9 -0
  64. package/types/animation/AnimatorStateTransitionCollection.d.ts +23 -1
  65. package/types/animation/StateMachineScript.d.ts +2 -0
  66. package/types/animation/animationCurve/AnimationArrayCurve.d.ts +39 -0
  67. package/types/animation/animationCurve/AnimationBoolCurve.d.ts +39 -0
  68. package/types/animation/animationCurve/AnimationColorCurve.d.ts +39 -0
  69. package/types/animation/animationCurve/AnimationCurve.d.ts +8 -0
  70. package/types/animation/animationCurve/AnimationFloatArrayCurve.d.ts +38 -0
  71. package/types/animation/animationCurve/AnimationFloatCurve.d.ts +39 -0
  72. package/types/animation/animationCurve/AnimationQuaternionCurve.d.ts +41 -0
  73. package/types/animation/animationCurve/AnimationRectCurve.d.ts +18 -0
  74. package/types/animation/animationCurve/AnimationRefCurve.d.ts +18 -0
  75. package/types/animation/animationCurve/AnimationStringCurve.d.ts +39 -0
  76. package/types/animation/animationCurve/AnimationVector2Curve.d.ts +39 -0
  77. package/types/animation/animationCurve/AnimationVector3Curve.d.ts +43 -0
  78. package/types/animation/animationCurve/AnimationVector4Curve.d.ts +39 -0
  79. package/types/animation/animationCurve/interfaces/IAnimationCurveCalculator.d.ts +18 -1
  80. package/types/animation/enums/AnimatorStatePlayState.d.ts +8 -1
  81. package/types/animation/internal/AnimationCurveLayerOwner.d.ts +15 -1
  82. package/types/animation/internal/AnimationEventHandler.d.ts +8 -1
  83. package/types/animation/internal/AnimatorLayerData.d.ts +28 -1
  84. package/types/animation/internal/AnimatorStateData.d.ts +14 -1
  85. package/types/animation/internal/AnimatorStatePlayData.d.ts +27 -1
  86. package/types/animation/internal/AnimatorTempValue.d.ts +12 -1
  87. package/types/animation/internal/animationCurveOwner/AnimationCurveOwner.d.ts +39 -0
  88. package/types/animation/internal/animationCurveOwner/assembler/BlendShapeWeightsAnimationCurveOwnerAssembler.d.ts +12 -1
  89. package/types/animation/internal/animationCurveOwner/assembler/IAnimationCurveOwnerAssembler.d.ts +10 -1
  90. package/types/animation/internal/animationCurveOwner/assembler/PositionAnimationCurveOwnerAssembler.d.ts +13 -1
  91. package/types/animation/internal/animationCurveOwner/assembler/RotationAnimationCurveOwnerAssembler.d.ts +13 -1
  92. package/types/animation/internal/animationCurveOwner/assembler/ScaleAnimationCurveOwnerAssembler.d.ts +13 -1
  93. package/types/animation/internal/animationCurveOwner/assembler/UniversalAnimationCurveOwnerAssembler.d.ts +23 -1
  94. package/types/asset/GraphicsResource.d.ts +10 -0
  95. package/types/asset/IReferable.d.ts +8 -0
  96. package/types/asset/ReferResource.d.ts +28 -0
  97. package/types/asset/RenderingStatistics.d.ts +8 -0
  98. package/types/asset/ResourceManager.d.ts +94 -4
  99. package/types/audio/AudioClip.d.ts +8 -0
  100. package/types/audio/AudioManager.d.ts +14 -0
  101. package/types/audio/AudioSource.d.ts +17 -0
  102. package/types/base/EngineObject.d.ts +4 -0
  103. package/types/base/Time.d.ts +13 -0
  104. package/types/clone/CloneDecorators.d.ts +20 -0
  105. package/types/clone/CloneUtil.d.ts +30 -1
  106. package/types/clone/ComponentCloner.d.ts +11 -1
  107. package/types/enums/CameraType.d.ts +9 -1
  108. package/types/env-probe/CubeProbe.d.ts +2 -0
  109. package/types/graphic/Buffer.d.ts +10 -0
  110. package/types/graphic/BufferUtil.d.ts +5 -0
  111. package/types/graphic/IndexBufferBinding.d.ts +4 -0
  112. package/types/graphic/Mesh.d.ts +54 -0
  113. package/types/graphic/Primitive.d.ts +50 -1
  114. package/types/graphic/TransformFeedback.d.ts +46 -1
  115. package/types/graphic/TransformFeedbackPrimitive.d.ts +67 -1
  116. package/types/graphic/TransformFeedbackSimulator.d.ts +55 -1
  117. package/types/graphic/VertexBufferBinding.d.ts +4 -0
  118. package/types/input/InputManager.d.ts +19 -0
  119. package/types/input/enums/PointerButton.d.ts +8 -0
  120. package/types/input/keyboard/KeyboardManager.d.ts +41 -1
  121. package/types/input/pointer/Pointer.d.ts +36 -0
  122. package/types/input/pointer/PointerEventData.d.ts +4 -0
  123. package/types/input/pointer/PointerManager.d.ts +58 -0
  124. package/types/input/pointer/emitter/IHitResult.d.ts +11 -1
  125. package/types/input/pointer/emitter/PhysicsPointerEventEmitter.d.ts +20 -1
  126. package/types/input/wheel/WheelManager.d.ts +34 -1
  127. package/types/lighting/AmbientLight.d.ts +9 -0
  128. package/types/lighting/DirectLight.d.ts +17 -0
  129. package/types/lighting/Light.d.ts +2 -0
  130. package/types/lighting/LightManager.d.ts +57 -0
  131. package/types/lighting/PointLight.d.ts +17 -0
  132. package/types/lighting/SpotLight.d.ts +17 -0
  133. package/types/lighting/ambientOcclusion/AmbientOcclusion.d.ts +4 -0
  134. package/types/lighting/ambientOcclusion/ScalableAmbientObscurancePass.d.ts +38 -1
  135. package/types/material/BaseMaterial.d.ts +4 -0
  136. package/types/material/Material.d.ts +2 -0
  137. package/types/mesh/BlendShape.d.ts +13 -0
  138. package/types/mesh/BlendShapeFrame.d.ts +7 -0
  139. package/types/mesh/BlendShapeManager.d.ts +101 -1
  140. package/types/mesh/MeshRenderer.d.ts +37 -0
  141. package/types/mesh/ModelMesh.d.ts +18 -0
  142. package/types/mesh/PrimitiveMesh.d.ts +28 -0
  143. package/types/mesh/PrimitiveMeshRestorer.d.ts +107 -0
  144. package/types/mesh/Skin.d.ts +10 -0
  145. package/types/mesh/SkinnedMeshRenderer.d.ts +21 -0
  146. package/types/particle/ParticleBufferUtils.d.ts +26 -1
  147. package/types/particle/ParticleGenerator.d.ts +102 -0
  148. package/types/particle/ParticleRenderer.d.ts +55 -0
  149. package/types/particle/ParticleTransformFeedbackSimulator.d.ts +52 -1
  150. package/types/particle/enums/ParticleRandomSubSeeds.d.ts +25 -1
  151. package/types/particle/enums/attributes/BillboardParticleVertexAttribute.d.ts +6 -1
  152. package/types/particle/enums/attributes/ParticleFeedbackVertexAttribute.d.ts +8 -1
  153. package/types/particle/enums/attributes/ParticleInstanceVertexAttribute.d.ts +17 -1
  154. package/types/particle/modules/ColorOverLifetimeModule.d.ts +12 -0
  155. package/types/particle/modules/CustomDataModule.d.ts +5 -0
  156. package/types/particle/modules/EmissionModule.d.ts +28 -0
  157. package/types/particle/modules/ForceOverLifetimeModule.d.ts +16 -1
  158. package/types/particle/modules/LimitVelocityOverLifetimeModule.d.ts +20 -1
  159. package/types/particle/modules/MainModule.d.ts +33 -1
  160. package/types/particle/modules/NoiseModule.d.ts +12 -1
  161. package/types/particle/modules/ParticleCompositeCurve.d.ts +37 -0
  162. package/types/particle/modules/ParticleCurve.d.ts +28 -0
  163. package/types/particle/modules/ParticleGeneratorModule.d.ts +7 -0
  164. package/types/particle/modules/ParticleGradient.d.ts +16 -0
  165. package/types/particle/modules/RotationOverLifetimeModule.d.ts +12 -0
  166. package/types/particle/modules/SizeOverLifetimeModule.d.ts +16 -0
  167. package/types/particle/modules/SubEmitter.d.ts +3 -0
  168. package/types/particle/modules/SubEmittersModule.d.ts +17 -0
  169. package/types/particle/modules/TextureSheetAnimationModule.d.ts +14 -1
  170. package/types/particle/modules/VelocityOverLifetimeModule.d.ts +28 -1
  171. package/types/particle/modules/shape/BaseShape.d.ts +33 -1
  172. package/types/particle/modules/shape/BoxShape.d.ts +13 -1
  173. package/types/particle/modules/shape/CircleShape.d.ts +13 -0
  174. package/types/particle/modules/shape/ConeShape.d.ts +13 -0
  175. package/types/particle/modules/shape/HemisphereShape.d.ts +13 -0
  176. package/types/particle/modules/shape/MeshShape.d.ts +17 -0
  177. package/types/particle/modules/shape/ShapeUtils.d.ts +13 -1
  178. package/types/particle/modules/shape/SphereShape.d.ts +13 -0
  179. package/types/physics/CharacterController.d.ts +21 -0
  180. package/types/physics/Collider.d.ts +39 -0
  181. package/types/physics/Collision.d.ts +3 -0
  182. package/types/physics/DynamicCollider.d.ts +14 -0
  183. package/types/physics/PhysicsMaterial.d.ts +3 -0
  184. package/types/physics/PhysicsScene.d.ts +51 -0
  185. package/types/physics/StaticCollider.d.ts +5 -0
  186. package/types/physics/enums/ColliderShapeChangeFlag.d.ts +8 -1
  187. package/types/physics/enums/HingeJointFlag.d.ts +14 -1
  188. package/types/physics/joint/HingeJoint.d.ts +4 -0
  189. package/types/physics/joint/Joint.d.ts +20 -0
  190. package/types/physics/joint/JointLimits.d.ts +3 -0
  191. package/types/physics/joint/JointMotor.d.ts +3 -0
  192. package/types/physics/shape/ColliderShape.d.ts +17 -0
  193. package/types/physics/shape/MeshColliderShape.d.ts +4 -0
  194. package/types/postProcess/FinalPass.d.ts +19 -1
  195. package/types/postProcess/PostProcess.d.ts +2 -0
  196. package/types/postProcess/PostProcessEffect.d.ts +4 -0
  197. package/types/postProcess/PostProcessEffectParameter.d.ts +4 -0
  198. package/types/postProcess/PostProcessManager.d.ts +43 -0
  199. package/types/postProcess/effects/BloomEffect.d.ts +25 -0
  200. package/types/postProcess/effects/TonemappingEffect.d.ts +3 -0
  201. package/types/renderingHardwareInterface/IPlatformTransformFeedback.d.ts +36 -1
  202. package/types/renderingHardwareInterface/IPlatformTransformFeedbackPrimitive.d.ts +40 -1
  203. package/types/shader/Shader.d.ts +22 -0
  204. package/types/shader/ShaderBlockProperty.d.ts +19 -1
  205. package/types/shader/ShaderData.d.ts +29 -0
  206. package/types/shader/ShaderFactory.d.ts +23 -0
  207. package/types/shader/ShaderMacro.d.ts +15 -0
  208. package/types/shader/ShaderMacroCollection.d.ts +57 -1
  209. package/types/shader/ShaderMacroProcessor.d.ts +72 -1
  210. package/types/shader/ShaderPass.d.ts +38 -0
  211. package/types/shader/ShaderProgram.d.ts +91 -1
  212. package/types/shader/ShaderProgramMap.d.ts +20 -1
  213. package/types/shader/ShaderProperty.d.ts +17 -0
  214. package/types/shader/ShaderTagKey.d.ts +2 -0
  215. package/types/shader/ShaderUniform.d.ts +49 -1
  216. package/types/shader/ShaderUniformBlock.d.ts +9 -1
  217. package/types/shader/enums/ConstantBufferBindingPoint.d.ts +7 -1
  218. package/types/shader/state/BlendState.d.ts +14 -0
  219. package/types/shader/state/DepthState.d.ts +14 -0
  220. package/types/shader/state/RasterState.d.ts +17 -0
  221. package/types/shader/state/RenderState.d.ts +11 -0
  222. package/types/shader/state/StencilState.d.ts +13 -0
  223. package/types/shadow/CascadedShadowCasterPass.d.ts +5 -0
  224. package/types/shadow/ShadowSliceData.d.ts +13 -1
  225. package/types/shadow/ShadowUtils.d.ts +43 -1
  226. package/types/sky/Sky.d.ts +9 -0
  227. package/types/texture/RenderTarget.d.ts +21 -0
  228. package/types/texture/Texture.d.ts +21 -0
  229. package/types/texture/Texture2D.d.ts +4 -0
  230. package/types/texture/Texture2DArray.d.ts +4 -0
  231. package/types/texture/TextureCube.d.ts +4 -0
  232. package/types/texture/TextureUtils.d.ts +16 -1
  233. package/types/trail/TrailRenderer.d.ts +5 -0
  234. package/types/ui/IUICanvas.d.ts +16 -1
  235. package/types/utils/DisorderedArray.d.ts +2 -0
  236. 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 EngineObject>(assetItem: LoadItem): AssetPromise<T>;
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 EngineObject[]>(assetItems: LoadItem[]): AssetPromise<T>;
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 EngineObject[]>(paths: string[]): AssetPromise<T>;
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 EngineObject>(path: string): AssetPromise<T>;
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.
@@ -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
- export {};
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
- export {};
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
+ }
@@ -1 +1,9 @@
1
- export {};
1
+ /**
2
+ * @internal
3
+ */
4
+ export declare enum CameraType {
5
+ Normal = 0,
6
+ XRCenterCamera = 1,
7
+ XRLeftCamera = 2,
8
+ XRRightCamera = 4
9
+ }
@@ -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
  }
@@ -4,6 +4,10 @@ import { Buffer } from "./Buffer";
4
4
  * Index buffer binding.
5
5
  */
6
6
  export declare class IndexBufferBinding {
7
+ /** @internal */
8
+ _buffer: Buffer;
9
+ /** @internal */
10
+ _format: IndexFormat;
7
11
  /**
8
12
  * Index buffer.
9
13
  */
@@ -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
- export {};
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
- export {};
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
+ }