@galacean/engine-core 2.0.0-alpha.5 → 2.0.0-alpha.50

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 (293) hide show
  1. package/dist/main.js +23868 -20447
  2. package/dist/main.js.map +1 -1
  3. package/dist/module.js +23856 -20439
  4. package/dist/module.js.map +1 -1
  5. package/package.json +3 -3
  6. package/types/2d/assembler/ISpriteAssembler.d.ts +1 -0
  7. package/types/2d/assembler/ISpriteRenderer.d.ts +3 -2
  8. package/types/2d/assembler/SimpleSpriteAssembler.d.ts +1 -0
  9. package/types/2d/assembler/SlicedSpriteAssembler.d.ts +1 -0
  10. package/types/2d/assembler/TiledSpriteAssembler.d.ts +1 -0
  11. package/types/2d/atlas/FontAtlas.d.ts +23 -1
  12. package/types/2d/atlas/SpriteAtlas.d.ts +8 -0
  13. package/types/2d/sprite/Sprite.d.ts +30 -4
  14. package/types/2d/sprite/SpriteMask.d.ts +49 -1
  15. package/types/2d/sprite/SpriteRenderer.d.ts +35 -1
  16. package/types/2d/text/CharInfo.d.ts +20 -1
  17. package/types/2d/text/CharRenderInfo.d.ts +15 -1
  18. package/types/2d/text/Font.d.ts +11 -1
  19. package/types/2d/text/ITextRenderer.d.ts +3 -0
  20. package/types/2d/text/SubFont.d.ts +35 -1
  21. package/types/2d/text/TextRenderer.d.ts +54 -1
  22. package/types/2d/text/TextUtils.d.ts +89 -1
  23. package/types/Background.d.ts +19 -2
  24. package/types/BasicResources.d.ts +52 -0
  25. package/types/Camera.d.ts +73 -1
  26. package/types/Canvas.d.ts +36 -7
  27. package/types/Component.d.ts +35 -2
  28. package/types/ComponentsDependencies.d.ts +38 -1
  29. package/types/ComponentsManager.d.ts +17 -0
  30. package/types/Engine.d.ts +110 -4
  31. package/types/EngineEventType.d.ts +13 -0
  32. package/types/Entity.d.ts +112 -21
  33. package/types/Polyfill.d.ts +12 -1
  34. package/types/RenderPipeline/BasicRenderPipeline.d.ts +4 -1
  35. package/types/RenderPipeline/BatcherManager.d.ts +23 -1
  36. package/types/RenderPipeline/Blitter.d.ts +1 -1
  37. package/types/RenderPipeline/CullingResults.d.ts +17 -1
  38. package/types/RenderPipeline/DepthOnlyPass.d.ts +18 -1
  39. package/types/RenderPipeline/InstanceBuffer.d.ts +28 -0
  40. package/types/RenderPipeline/MaskManager.d.ts +36 -1
  41. package/types/RenderPipeline/OpaqueTexturePass.d.ts +16 -1
  42. package/types/RenderPipeline/PipelineUtils.d.ts +11 -1
  43. package/types/RenderPipeline/PrimitiveChunk.d.ts +27 -1
  44. package/types/RenderPipeline/PrimitiveChunkManager.d.ts +16 -1
  45. package/types/RenderPipeline/RenderContext.d.ts +46 -1
  46. package/types/RenderPipeline/RenderElement.d.ts +26 -6
  47. package/types/RenderPipeline/RenderQueue.d.ts +23 -1
  48. package/types/RenderPipeline/RenderTargetPool.d.ts +17 -1
  49. package/types/RenderPipeline/SubPrimitiveChunk.d.ts +14 -1
  50. package/types/RenderPipeline/VertexArea.d.ts +10 -1
  51. package/types/RenderPipeline/VertexMergeBatcher.d.ts +11 -0
  52. package/types/RenderPipeline/enums/RenderQueueMaskType.d.ts +9 -1
  53. package/types/RenderPipeline/index.d.ts +4 -1
  54. package/types/Renderer.d.ts +81 -18
  55. package/types/Scene.d.ts +34 -7
  56. package/types/SceneManager.d.ts +18 -6
  57. package/types/Script.d.ts +41 -0
  58. package/types/Signal.d.ts +69 -0
  59. package/types/SystemInfo.d.ts +13 -0
  60. package/types/Transform.d.ts +26 -1
  61. package/types/UpdateFlag.d.ts +4 -1
  62. package/types/UpdateFlagManager.d.ts +41 -1
  63. package/types/Utils.d.ts +20 -0
  64. package/types/VirtualCamera.d.ts +16 -1
  65. package/types/animation/AnimationClip.d.ts +13 -2
  66. package/types/animation/AnimationClipCurveBinding.d.ts +17 -2
  67. package/types/animation/AnimationEvent.d.ts +2 -2
  68. package/types/animation/Animator.d.ts +49 -10
  69. package/types/animation/AnimatorController.d.ts +20 -2
  70. package/types/animation/AnimatorControllerLayer.d.ts +17 -2
  71. package/types/animation/AnimatorControllerParameter.d.ts +4 -0
  72. package/types/animation/AnimatorState.d.ts +46 -2
  73. package/types/animation/AnimatorStateInstance.d.ts +46 -0
  74. package/types/animation/AnimatorStateMachine.d.ts +17 -2
  75. package/types/animation/AnimatorStateTransition.d.ts +9 -0
  76. package/types/animation/AnimatorStateTransitionCollection.d.ts +23 -1
  77. package/types/animation/Keyframe.d.ts +1 -1
  78. package/types/animation/StateMachineScript.d.ts +2 -0
  79. package/types/animation/animationCurve/AnimationArrayCurve.d.ts +39 -0
  80. package/types/animation/animationCurve/AnimationBoolCurve.d.ts +39 -0
  81. package/types/animation/animationCurve/AnimationColorCurve.d.ts +39 -0
  82. package/types/animation/animationCurve/AnimationCurve.d.ts +9 -1
  83. package/types/animation/animationCurve/AnimationFloatArrayCurve.d.ts +38 -0
  84. package/types/animation/animationCurve/AnimationFloatCurve.d.ts +39 -0
  85. package/types/animation/animationCurve/AnimationQuaternionCurve.d.ts +41 -0
  86. package/types/animation/animationCurve/AnimationRectCurve.d.ts +18 -0
  87. package/types/animation/animationCurve/AnimationRefCurve.d.ts +20 -2
  88. package/types/animation/animationCurve/AnimationStringCurve.d.ts +39 -0
  89. package/types/animation/animationCurve/AnimationVector2Curve.d.ts +39 -0
  90. package/types/animation/animationCurve/AnimationVector3Curve.d.ts +43 -0
  91. package/types/animation/animationCurve/AnimationVector4Curve.d.ts +39 -0
  92. package/types/animation/animationCurve/interfaces/IAnimationCurveCalculator.d.ts +18 -1
  93. package/types/animation/enums/AnimatorStatePlayState.d.ts +8 -1
  94. package/types/animation/index.d.ts +1 -0
  95. package/types/animation/internal/AnimationCurveLayerOwner.d.ts +15 -1
  96. package/types/animation/internal/AnimationEventHandler.d.ts +8 -1
  97. package/types/animation/internal/AnimatorLayerData.d.ts +28 -1
  98. package/types/animation/internal/AnimatorStateData.d.ts +14 -1
  99. package/types/animation/internal/AnimatorStatePlayData.d.ts +27 -1
  100. package/types/animation/internal/AnimatorTempValue.d.ts +12 -1
  101. package/types/animation/internal/animationCurveOwner/AnimationCurveOwner.d.ts +39 -0
  102. package/types/animation/internal/animationCurveOwner/assembler/BlendShapeWeightsAnimationCurveOwnerAssembler.d.ts +12 -1
  103. package/types/animation/internal/animationCurveOwner/assembler/IAnimationCurveOwnerAssembler.d.ts +10 -1
  104. package/types/animation/internal/animationCurveOwner/assembler/PositionAnimationCurveOwnerAssembler.d.ts +13 -1
  105. package/types/animation/internal/animationCurveOwner/assembler/RotationAnimationCurveOwnerAssembler.d.ts +13 -1
  106. package/types/animation/internal/animationCurveOwner/assembler/ScaleAnimationCurveOwnerAssembler.d.ts +13 -1
  107. package/types/animation/internal/animationCurveOwner/assembler/UniversalAnimationCurveOwnerAssembler.d.ts +23 -1
  108. package/types/asset/AssetPromise.d.ts +4 -4
  109. package/types/asset/AssetType.d.ts +7 -9
  110. package/types/asset/GraphicsResource.d.ts +10 -0
  111. package/types/asset/IReferable.d.ts +8 -0
  112. package/types/asset/JSONAsset.d.ts +1 -1
  113. package/types/asset/LoadItem.d.ts +1 -1
  114. package/types/asset/Loader.d.ts +2 -2
  115. package/types/asset/ReferResource.d.ts +28 -0
  116. package/types/asset/RenderingStatistics.d.ts +8 -0
  117. package/types/asset/ResourceManager.d.ts +117 -9
  118. package/types/audio/AudioClip.d.ts +8 -0
  119. package/types/audio/AudioManager.d.ts +18 -0
  120. package/types/audio/AudioSource.d.ts +20 -2
  121. package/types/base/DataObject.d.ts +6 -0
  122. package/types/base/EngineObject.d.ts +4 -0
  123. package/types/base/Time.d.ts +13 -0
  124. package/types/base/index.d.ts +1 -0
  125. package/types/clone/CloneDecorators.d.ts +37 -0
  126. package/types/clone/CloneUtil.d.ts +30 -0
  127. package/types/clone/ComponentCloner.d.ts +4 -10
  128. package/types/clone/ICloneHook.d.ts +12 -0
  129. package/types/enums/CameraType.d.ts +9 -1
  130. package/types/env-probe/CubeProbe.d.ts +2 -0
  131. package/types/env-probe/Probe.d.ts +1 -1
  132. package/types/graphic/Buffer.d.ts +23 -3
  133. package/types/graphic/BufferUtil.d.ts +8 -0
  134. package/types/graphic/IndexBufferBinding.d.ts +4 -0
  135. package/types/graphic/Mesh.d.ts +58 -1
  136. package/types/graphic/Primitive.d.ts +50 -1
  137. package/types/graphic/TransformFeedback.d.ts +46 -0
  138. package/types/graphic/TransformFeedbackPrimitive.d.ts +67 -0
  139. package/types/graphic/TransformFeedbackSimulator.d.ts +55 -0
  140. package/types/graphic/VertexBufferBinding.d.ts +4 -0
  141. package/types/graphic/VertexElement.d.ts +1 -0
  142. package/types/graphic/enums/BufferBindFlag.d.ts +5 -3
  143. package/types/index.d.ts +7 -4
  144. package/types/input/InputManager.d.ts +25 -6
  145. package/types/input/enums/PointerButton.d.ts +8 -0
  146. package/types/input/keyboard/KeyboardManager.d.ts +41 -1
  147. package/types/input/pointer/Pointer.d.ts +37 -1
  148. package/types/input/pointer/PointerEventData.d.ts +4 -0
  149. package/types/input/pointer/PointerManager.d.ts +58 -0
  150. package/types/input/pointer/emitter/IHitResult.d.ts +11 -1
  151. package/types/input/pointer/emitter/PhysicsPointerEventEmitter.d.ts +20 -1
  152. package/types/input/wheel/WheelManager.d.ts +34 -1
  153. package/types/lighting/AmbientLight.d.ts +9 -8
  154. package/types/lighting/DirectLight.d.ts +17 -0
  155. package/types/lighting/KHR_lights.d.ts +13 -1
  156. package/types/lighting/Light.d.ts +2 -0
  157. package/types/lighting/LightManager.d.ts +57 -0
  158. package/types/lighting/PointLight.d.ts +17 -0
  159. package/types/lighting/SpotLight.d.ts +17 -0
  160. package/types/lighting/ambientOcclusion/AmbientOcclusion.d.ts +4 -0
  161. package/types/lighting/ambientOcclusion/ScalableAmbientObscurancePass.d.ts +38 -1
  162. package/types/material/BaseMaterial.d.ts +15 -11
  163. package/types/material/Material.d.ts +5 -9
  164. package/types/mesh/BlendShape.d.ts +14 -1
  165. package/types/mesh/BlendShapeFrame.d.ts +11 -4
  166. package/types/mesh/BlendShapeManager.d.ts +101 -1
  167. package/types/mesh/BufferMesh.d.ts +2 -2
  168. package/types/mesh/MeshRenderer.d.ts +42 -0
  169. package/types/mesh/ModelMesh.d.ts +23 -4
  170. package/types/mesh/PrimitiveMesh.d.ts +38 -4
  171. package/types/mesh/PrimitiveMeshRestorer.d.ts +107 -0
  172. package/types/mesh/Skin.d.ts +12 -3
  173. package/types/mesh/SkinnedMeshRenderer.d.ts +27 -1
  174. package/types/particle/ParticleBufferUtils.d.ts +26 -1
  175. package/types/particle/ParticleGenerator.d.ts +147 -2
  176. package/types/particle/ParticleMaterial.d.ts +3 -1
  177. package/types/particle/ParticleRenderer.d.ts +61 -1
  178. package/types/particle/ParticleTransformFeedbackSimulator.d.ts +52 -0
  179. package/types/particle/enums/ParticleRandomSubSeeds.d.ts +25 -1
  180. package/types/particle/enums/ParticleScaleMode.d.ts +5 -5
  181. package/types/particle/enums/ParticleSubEmitterInheritProperty.d.ts +17 -0
  182. package/types/particle/enums/ParticleSubEmitterType.d.ts +9 -0
  183. package/types/particle/enums/attributes/BillboardParticleVertexAttribute.d.ts +6 -1
  184. package/types/particle/enums/attributes/ParticleFeedbackVertexAttribute.d.ts +8 -0
  185. package/types/particle/enums/attributes/ParticleInstanceVertexAttribute.d.ts +17 -1
  186. package/types/particle/index.d.ts +7 -0
  187. package/types/particle/modules/Burst.d.ts +23 -2
  188. package/types/particle/modules/ColorOverLifetimeModule.d.ts +19 -0
  189. package/types/particle/modules/CustomDataModule.d.ts +90 -0
  190. package/types/particle/modules/EmissionModule.d.ts +36 -0
  191. package/types/particle/modules/ForceOverLifetimeModule.d.ts +16 -1
  192. package/types/particle/modules/LimitVelocityOverLifetimeModule.d.ts +164 -0
  193. package/types/particle/modules/MainModule.d.ts +45 -6
  194. package/types/particle/modules/NoiseModule.d.ts +114 -0
  195. package/types/particle/modules/ParticleCompositeCurve.d.ts +42 -4
  196. package/types/particle/modules/ParticleCompositeGradient.d.ts +8 -2
  197. package/types/particle/modules/ParticleCurve.d.ts +31 -2
  198. package/types/particle/modules/ParticleGeneratorModule.d.ts +9 -3
  199. package/types/particle/modules/ParticleGradient.d.ts +22 -5
  200. package/types/particle/modules/RotationOverLifetimeModule.d.ts +27 -3
  201. package/types/particle/modules/SizeOverLifetimeModule.d.ts +25 -0
  202. package/types/particle/modules/SubEmitter.d.ts +31 -0
  203. package/types/particle/modules/SubEmittersModule.d.ts +57 -0
  204. package/types/particle/modules/TextureSheetAnimationModule.d.ts +14 -1
  205. package/types/particle/modules/VelocityOverLifetimeModule.d.ts +120 -0
  206. package/types/particle/modules/shape/BaseShape.d.ts +65 -2
  207. package/types/particle/modules/shape/BoxShape.d.ts +13 -2
  208. package/types/particle/modules/shape/CircleShape.d.ts +13 -1
  209. package/types/particle/modules/shape/ConeShape.d.ts +13 -4
  210. package/types/particle/modules/shape/HemisphereShape.d.ts +13 -0
  211. package/types/particle/modules/shape/MeshShape.d.ts +26 -3
  212. package/types/particle/modules/shape/ShapeUtils.d.ts +13 -1
  213. package/types/particle/modules/shape/SphereShape.d.ts +13 -0
  214. package/types/physics/CharacterController.d.ts +21 -0
  215. package/types/physics/Collider.d.ts +47 -2
  216. package/types/physics/Collision.d.ts +3 -0
  217. package/types/physics/DynamicCollider.d.ts +28 -1
  218. package/types/physics/HitResult.d.ts +2 -2
  219. package/types/physics/PhysicsMaterial.d.ts +3 -0
  220. package/types/physics/PhysicsScene.d.ts +56 -6
  221. package/types/physics/StaticCollider.d.ts +5 -0
  222. package/types/physics/enums/ColliderShapeChangeFlag.d.ts +8 -1
  223. package/types/physics/enums/HingeJointFlag.d.ts +14 -1
  224. package/types/physics/joint/HingeJoint.d.ts +4 -0
  225. package/types/physics/joint/Joint.d.ts +22 -2
  226. package/types/physics/joint/JointLimits.d.ts +2 -1
  227. package/types/physics/joint/JointMotor.d.ts +2 -1
  228. package/types/physics/shape/ColliderShape.d.ts +26 -3
  229. package/types/physics/shape/MeshColliderShape.d.ts +11 -5
  230. package/types/postProcess/FinalPass.d.ts +19 -1
  231. package/types/postProcess/PostProcess.d.ts +11 -6
  232. package/types/postProcess/PostProcessEffect.d.ts +6 -1
  233. package/types/postProcess/PostProcessEffectParameter.d.ts +23 -3
  234. package/types/postProcess/PostProcessManager.d.ts +43 -0
  235. package/types/postProcess/PostProcessPass.d.ts +3 -2
  236. package/types/postProcess/PostProcessUberPass.d.ts +2 -1
  237. package/types/postProcess/effects/BloomEffect.d.ts +26 -1
  238. package/types/postProcess/effects/TonemappingEffect.d.ts +3 -0
  239. package/types/renderingHardwareInterface/IPlatformBuffer.d.ts +1 -0
  240. package/types/renderingHardwareInterface/IPlatformTransformFeedback.d.ts +36 -0
  241. package/types/renderingHardwareInterface/IPlatformTransformFeedbackPrimitive.d.ts +40 -0
  242. package/types/renderingHardwareInterface/index.d.ts +2 -0
  243. package/types/shader/Shader.d.ts +38 -22
  244. package/types/shader/ShaderBlockProperty.d.ts +19 -0
  245. package/types/shader/ShaderData.d.ts +43 -4
  246. package/types/shader/ShaderFactory.d.ts +78 -0
  247. package/types/shader/ShaderMacro.d.ts +17 -2
  248. package/types/shader/ShaderMacroCollection.d.ts +57 -1
  249. package/types/shader/ShaderMacroProcessor.d.ts +72 -0
  250. package/types/shader/ShaderPass.d.ts +46 -13
  251. package/types/shader/ShaderProgram.d.ts +91 -1
  252. package/types/shader/ShaderProgramMap.d.ts +20 -0
  253. package/types/shader/ShaderProperty.d.ts +17 -0
  254. package/types/shader/ShaderTagKey.d.ts +2 -0
  255. package/types/shader/ShaderUniform.d.ts +49 -1
  256. package/types/shader/ShaderUniformBlock.d.ts +9 -1
  257. package/types/shader/enums/ConstantBufferBindingPoint.d.ts +7 -0
  258. package/types/shader/enums/ShaderPreprocessorDirective.d.ts +16 -0
  259. package/types/shader/index.d.ts +1 -1
  260. package/types/shader/state/BlendState.d.ts +16 -1
  261. package/types/shader/state/DepthState.d.ts +16 -1
  262. package/types/shader/state/RasterState.d.ts +19 -1
  263. package/types/shader/state/RenderState.d.ts +13 -2
  264. package/types/shader/state/RenderTargetBlendState.d.ts +2 -1
  265. package/types/shader/state/StencilState.d.ts +15 -1
  266. package/types/shadow/CascadedShadowCasterPass.d.ts +5 -0
  267. package/types/shadow/ShadowSliceData.d.ts +13 -1
  268. package/types/shadow/ShadowUtils.d.ts +43 -1
  269. package/types/sky/Sky.d.ts +13 -4
  270. package/types/sky/SkyBoxMaterial.d.ts +0 -7
  271. package/types/texture/RenderTarget.d.ts +28 -3
  272. package/types/texture/Texture.d.ts +21 -0
  273. package/types/texture/Texture2D.d.ts +4 -0
  274. package/types/texture/Texture2DArray.d.ts +4 -0
  275. package/types/texture/TextureCube.d.ts +4 -0
  276. package/types/texture/TextureUtils.d.ts +16 -1
  277. package/types/trail/TrailRenderer.d.ts +13 -8
  278. package/types/ui/IUICanvas.d.ts +16 -1
  279. package/types/utils/DisorderedArray.d.ts +3 -1
  280. package/types/xr/XRManager.d.ts +28 -0
  281. package/types/RenderPipeline/BatchUtils.d.ts +0 -1
  282. package/types/RenderPipeline/SubRenderElement.d.ts +0 -22
  283. package/types/clone/CloneManager.d.ts +0 -31
  284. package/types/clone/enums/CloneMode.d.ts +0 -13
  285. package/types/shader/ShaderPool.d.ts +0 -1
  286. package/types/shader/ShaderProgramPool.d.ts +0 -1
  287. package/types/shader/state/index.d.ts +0 -6
  288. package/types/shaderlib/ShaderFactory.d.ts +0 -20
  289. package/types/shaderlib/ShaderLib.d.ts +0 -73
  290. package/types/shaderlib/index.d.ts +0 -1
  291. package/types/shaderlib/particle/index.d.ts +0 -15
  292. package/types/shaderlib/pbr/index.d.ts +0 -11
  293. package/types/shaderlib/shadow/index.d.ts +0 -8
@@ -1 +1,13 @@
1
- export {};
1
+ import { Vector3 } from "@galacean/engine-math";
2
+ import { KeyframeValueType } from "../../../Keyframe";
3
+ import { AnimationCurveOwner } from "../AnimationCurveOwner";
4
+ import { IAnimationCurveOwnerAssembler } from "./IAnimationCurveOwnerAssembler";
5
+ /**
6
+ * @internal
7
+ */
8
+ export declare class ScaleAnimationCurveOwnerAssembler implements IAnimationCurveOwnerAssembler<Vector3> {
9
+ private _transform;
10
+ initialize(owner: AnimationCurveOwner<KeyframeValueType>): void;
11
+ getTargetValue(): Vector3;
12
+ setTargetValue(value: Vector3): void;
13
+ }
@@ -1 +1,23 @@
1
- export {};
1
+ import { KeyframeValueType } from "../../../Keyframe";
2
+ import { AnimationCurveOwner } from "../AnimationCurveOwner";
3
+ import { IAnimationCurveOwnerAssembler } from "./IAnimationCurveOwnerAssembler";
4
+ /**
5
+ * @internal
6
+ */
7
+ export declare class UniversalAnimationCurveOwnerAssembler implements IAnimationCurveOwnerAssembler<KeyframeValueType> {
8
+ private _getMounted;
9
+ private _setMounted;
10
+ private _getType;
11
+ private _setType;
12
+ private _getValueName;
13
+ private _setValueName;
14
+ private _getArgs;
15
+ private _setArgs;
16
+ private _replaceValueIndex;
17
+ private _getArrayIndex;
18
+ private _setArrayIndex;
19
+ initialize(owner: AnimationCurveOwner<KeyframeValueType>): void;
20
+ getTargetValue(): KeyframeValueType;
21
+ setTargetValue(value: KeyframeValueType): void;
22
+ private _initializeMounted;
23
+ }
@@ -57,8 +57,8 @@ export declare class AssetPromise<T> implements PromiseLike<T> {
57
57
  * @param onTaskDetail - This callback function provides detailed progress information about the task. For instance, in file downloading scenarios, you can use the loaded and total parameters to calculate the download progress percentage and utilize the url parameter to provide additional details such as download speed and estimated remaining time
58
58
  * @returns AssetPromise
59
59
  */
60
- onProgress(onTaskComplete: (loaded: number, total: number) => void, onTaskDetail?: (identifier: string, loaded: number, total: number) => void): AssetPromise<T>;
61
- then<TResult1 = T, TResult2 = never>(onfulfilled?: (value: T) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): AssetPromise<TResult1 | TResult2>;
60
+ onProgress(onTaskComplete?: (loaded: number, total: number) => void, onTaskDetail?: (identifier: string, loaded: number, total: number) => void): AssetPromise<T>;
61
+ then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null): AssetPromise<TResult1 | TResult2>;
62
62
  /**
63
63
  * Attaches a callback for only the rejection of the Promise.
64
64
  * @param onRejected - The callback to execute when the Promise is rejected.
@@ -77,10 +77,10 @@ export declare class AssetPromise<T> implements PromiseLike<T> {
77
77
  * Cancel promise request.
78
78
  * @returns Asset promise
79
79
  */
80
- cancel(): AssetPromise<T>;
80
+ cancel(): AssetPromise<T> | undefined;
81
81
  }
82
82
  interface AssetPromiseExecutor<T> {
83
- (resolve: (value?: T | PromiseLike<T>) => void, reject?: (reason?: any) => void, setTaskCompleteProgress?: TaskCompleteCallback, setTaskDetailProgress?: TaskDetailCallback, onCancel?: (callback: () => void) => void): void;
83
+ (resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: any) => void, setTaskCompleteProgress: TaskCompleteCallback, setTaskDetailProgress: TaskDetailCallback, onCancel: (callback: () => void) => void): void;
84
84
  }
85
85
  type TaskCompleteCallback = (loaded: number, total: number) => void;
86
86
  type TaskDetailCallback = (url: string, loaded: number, total: number) => void;
@@ -8,10 +8,8 @@ export declare enum AssetType {
8
8
  JSON = "JSON",
9
9
  /** ArrayBuffer. */
10
10
  Buffer = "Buffer",
11
- /** 2D Texture. */
12
- Texture2D = "Texture2D",
13
- /** Cube Texture. */
14
- TextureCube = "TextureCube",
11
+ /** Texture. */
12
+ Texture = "Texture",
15
13
  /** Material. */
16
14
  Material = "Material",
17
15
  /** Shader. */
@@ -39,19 +37,19 @@ export declare enum AssetType {
39
37
  /** Sprite Atlas. */
40
38
  SpriteAtlas = "SpriteAtlas",
41
39
  /** Ambient light. */
42
- Env = "Environment",
40
+ AmbientLight = "AmbientLight",
43
41
  /** Scene. */
44
42
  Scene = "Scene",
45
- /** HDR to cube. */
46
- HDR = "HDR",
47
43
  /** Font. */
48
44
  Font = "Font",
49
45
  /** Source Font, include ttf, otf and woff. */
50
46
  SourceFont = "SourceFont",
51
- /** AudioClip, include ogg, wav and mp3. */
47
+ /** AudioClip, include ogg, wav, mp3, m4a, aac and flac. */
52
48
  Audio = "Audio",
53
49
  /** Project asset. */
54
50
  Project = "project",
55
51
  /** PhysicsMaterial. */
56
- PhysicsMaterial = "PhysicsMaterial"
52
+ PhysicsMaterial = "PhysicsMaterial",
53
+ /** RenderTarget. */
54
+ RenderTarget = "RenderTarget"
57
55
  }
@@ -1,9 +1,19 @@
1
1
  import { Engine } from "../Engine";
2
2
  import { ReferResource } from "./ReferResource";
3
3
  export declare abstract class GraphicsResource extends ReferResource {
4
+ /** @internal */
5
+ _isContentLost: boolean;
4
6
  /**
5
7
  * Whether the content of the resource is lost.
6
8
  */
7
9
  get isContentLost(): boolean;
8
10
  protected constructor(engine: Engine);
11
+ /**
12
+ * @internal
13
+ */
14
+ abstract _rebuild(): void;
15
+ /**
16
+ * @internal
17
+ */
18
+ protected _onDestroy(): void;
9
19
  }
@@ -1,2 +1,10 @@
1
1
  export interface IReferable {
2
+ /**
3
+ * @internal
4
+ */
5
+ _getReferCount(): number;
6
+ /**
7
+ * @internal
8
+ */
9
+ _addReferCount(count: number): void;
2
10
  }
@@ -4,6 +4,6 @@ import { EngineObject } from "../base/EngineObject";
4
4
  */
5
5
  export declare class JSONAsset extends EngineObject {
6
6
  /** The parsed JSON data. */
7
- data: Object;
7
+ data: object;
8
8
  protected _onDestroy(): void;
9
9
  }
@@ -29,7 +29,7 @@ export type LoadItem = {
29
29
  params?: Record<string, any>;
30
30
  } & PickOnlyOne<{
31
31
  /**
32
- * Loading url.
32
+ * URL of the resource to load.
33
33
  */
34
34
  url: string;
35
35
  /**
@@ -28,10 +28,10 @@ export declare abstract class Loader<T> {
28
28
  * @param obj - class object
29
29
  * @returns class name
30
30
  */
31
- static getClassName(obj: Object): string;
31
+ static getClassName(obj: object): string | undefined;
32
32
  private static _engineObjects;
33
33
  private static _classNameMap;
34
34
  constructor(useCache: boolean);
35
- initialize?(engine: Engine, configuration: EngineConfiguration): Promise<void>;
35
+ initialize?(engine: Engine, configuration: EngineConfiguration): Promise<void> | void;
36
36
  abstract load(item: LoadItem, resourceManager: ResourceManager): AssetPromise<T>;
37
37
  }
@@ -20,4 +20,32 @@ export declare abstract class ReferResource extends EngineObject implements IRef
20
20
  * @returns Whether the release was successful
21
21
  */
22
22
  destroy(force?: boolean): boolean;
23
+ /**
24
+ * @internal
25
+ */
26
+ destroy(force: boolean, isGC: boolean): boolean;
27
+ /**
28
+ * @internal
29
+ */
30
+ _associationSuperResource(superResource: ReferResource): void;
31
+ /**
32
+ * @internal
33
+ */
34
+ _disassociationSuperResource(superResource: ReferResource): void;
35
+ /**
36
+ * @internal
37
+ */
38
+ _getReferCount(): number;
39
+ /**
40
+ * @internal
41
+ */
42
+ _addReferCount(value: number): void;
43
+ /**
44
+ * @internal
45
+ */
46
+ _addToResourceManager(path: string): void;
47
+ /**
48
+ * @internal
49
+ */
50
+ protected _onDestroy(): void;
23
51
  }
@@ -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,31 +52,31 @@ 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
- * @param url - Resource url
76
+ * @param url - Resource URL
64
77
  * @returns Resource object
65
78
  */
66
- getFromCache<T>(url: string): T;
79
+ getFromCache<T>(url: string): T | null;
67
80
  /**
68
81
  * Find the resource by type.
69
82
  * @param type - Resource type
@@ -82,12 +95,12 @@ export declare class ResourceManager {
82
95
  cancelNotLoaded(): void;
83
96
  /**
84
97
  * Cancel assets whose url has not finished loading.
85
- * @param url - Resource url
98
+ * @param url - Resource URL
86
99
  */
87
100
  cancelNotLoaded(url: string): void;
88
101
  /**
89
102
  * Cancel the incompletely loaded assets in urls.
90
- * @param urls - Resource urls
103
+ * @param urls - Resource URLs
91
104
  */
92
105
  cancelNotLoaded(urls: string[]): void;
93
106
  /**
@@ -100,16 +113,99 @@ export declare class ResourceManager {
100
113
  * @param restorer - The restorer
101
114
  */
102
115
  addContentRestorer<T extends EngineObject>(restorer: ContentRestorer<T>): void;
103
- private _assignDefaultOptions;
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;
176
+ private _resolveLoadItemOptions;
104
177
  private _loadSingleItem;
105
178
  private _loadSubpackageAndMainAsset;
106
179
  private _loadMainAsset;
107
180
  private _createSubAssetPromiseCallback;
108
181
  private _gc;
109
182
  private _getResolveResource;
183
+ private _getLoadingKey;
184
+ private _getRemoteAssetURL;
110
185
  private _parseURL;
111
186
  private _parseQueryPath;
112
187
  private _releaseSubAssetPromiseCallback;
188
+ /** @internal */
189
+ _objectPool: {
190
+ [key: string]: any;
191
+ };
192
+ /** @internal */
193
+ _virtualPathResourceMap: Record<VirtualPath, VirtualResource>;
194
+ /**
195
+ * Register virtual asset paths and their load descriptors.
196
+ * @remarks References inside runtime scenes and Prefabs can keep stable virtual paths while the backing URLs
197
+ * are generated dynamically, such as object URLs created from a resource package.
198
+ */
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>;
113
209
  }
114
210
  /**
115
211
  * Declare ResourceLoader's decorator.
@@ -119,3 +215,15 @@ export declare class ResourceManager {
119
215
  export declare function resourceLoader(assetType: string, extNames: string[], useCache?: boolean): <T extends Loader<any>>(Target: {
120
216
  new (useCache: boolean): T;
121
217
  }) => void;
218
+ type VirtualPath = string;
219
+ export interface VirtualResource {
220
+ virtualPath: string;
221
+ path: string;
222
+ type: string;
223
+ dependentAssetMap?: {
224
+ [key: string]: string;
225
+ };
226
+ subpackageName?: string;
227
+ params?: Record<string, any>;
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 | null;
27
+ /**
28
+ * @internal
29
+ */
30
+ _setAudioSource(value: AudioBuffer): void;
23
31
  protected _onDestroy(): void;
24
32
  }
@@ -2,10 +2,14 @@
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;
8
10
  private static _needsUserGestureResume;
11
+ private static _suspendedByCaller;
12
+ private static _recovering;
9
13
  /**
10
14
  * Suspend the audio context.
11
15
  * @returns A promise that resolves when the audio context is suspended
@@ -17,6 +21,20 @@ export declare class AudioManager {
17
21
  * @returns A promise that resolves when the audio context is resumed
18
22
  */
19
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;
20
36
  private static _onVisibilityChange;
37
+ private static _recoverPlaybackContext;
38
+ private static _onPageShow;
21
39
  private static _resumeAfterInterruption;
22
40
  }
@@ -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.
@@ -20,8 +21,8 @@ export declare class AudioSource extends Component {
20
21
  /**
21
22
  * The audio clip to play.
22
23
  */
23
- get clip(): AudioClip;
24
- set clip(value: AudioClip);
24
+ get clip(): AudioClip | null;
25
+ set clip(value: AudioClip | null);
25
26
  /**
26
27
  * Whether the clip playing right now.
27
28
  */
@@ -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,7 +71,20 @@ 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;
87
+ private _ensureGainNode;
70
88
  private _startPlayback;
71
89
  private _initSourceNode;
72
90
  private _clearSourceNode;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Base class for objects whose own enumerable string-keyed properties are structurally cloned by default.
3
+ * Subclasses must support argument-less construction when no compatible preset exists.
4
+ */
5
+ export declare abstract class DataObject {
6
+ }
@@ -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,5 +1,6 @@
1
1
  export { EventDispatcher } from "./EventDispatcher";
2
2
  export { Logger } from "./Logger";
3
3
  export { Time } from "./Time";
4
+ export { DataObject } from "./DataObject";
4
5
  export { EngineObject } from "./EngineObject";
5
6
  export * from "./Constant";
@@ -0,0 +1,37 @@
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
+ }
15
+ /**
16
+ * Property decorator — deep clone this field's whole subtree, overriding the value type's default
17
+ * clone mode (field-level decorators have the highest priority). The deep intent carries into
18
+ * field-cloneable members; engine-bound and platform objects keep their defaults. A decorator is
19
+ * an explicit intent: if the decorated value itself can't be deep cloned (an entity reference,
20
+ * asset, function, or object with opaque internal state), cloning throws rather than falling back.
21
+ * Field-cloned classes reproduce only their own enumerable string-keyed properties.
22
+ */
23
+ export declare function deepClone(target: object, propertyKey: string): void;
24
+ /**
25
+ * Property decorator — assign (share the reference) this field, overriding the value type's default clone mode.
26
+ */
27
+ export declare function assignmentClone(target: object, propertyKey: string): void;
28
+ /**
29
+ * Property decorator — ignore this field when cloning; keep the clone's own constructor-built value.
30
+ */
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;
@@ -0,0 +1,30 @@
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,17 +1,11 @@
1
1
  import { Component } from "../Component";
2
- import { Entity } from "../Entity";
3
2
  /**
4
- * Custom clone interface.
3
+ * @internal
4
+ * Clones component fields and runs the component's post-clone hook.
5
5
  */
6
- export interface ICustomClone {
7
- }
8
- export interface IComponentCustomClone {
9
- }
10
6
  export declare class ComponentCloner {
11
7
  /**
12
- * Clone component.
13
- * @param source - Clone source
14
- * @param target - Clone target
8
+ * @internal
15
9
  */
16
- static cloneComponent(source: Component, target: Component, srcRoot: Entity, targetRoot: Entity, deepInstanceMap: Map<Object, Object>): void;
10
+ static cloneComponent(source: Component, target: Component, cloneMap: Map<object, object>): void;
17
11
  }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Extends automatic field cloning with type-specific behavior.
3
+ * @typeParam T - Clone target type
4
+ */
5
+ export interface ICloneHook<T extends object = object> {
6
+ /**
7
+ * Called on the source after its fields have been cloned to the target.
8
+ * @param target - Populated clone target
9
+ * @param cloneMap - Source-to-clone identity map for the cloned graph
10
+ */
11
+ _onClone(target: T, cloneMap: ReadonlyMap<object, object>): void;
12
+ }