@galacean/engine-core 2.0.0-alpha.43 → 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 (238) hide show
  1. package/dist/main.js +3 -3
  2. package/dist/main.js.map +1 -1
  3. package/dist/module.js +3 -3
  4. package/dist/module.js.map +1 -1
  5. package/package.json +3 -3
  6. package/types/2d/atlas/FontAtlas.d.ts +23 -1
  7. package/types/2d/atlas/SpriteAtlas.d.ts +8 -0
  8. package/types/2d/sprite/Sprite.d.ts +27 -1
  9. package/types/2d/sprite/SpriteMask.d.ts +43 -0
  10. package/types/2d/sprite/SpriteRenderer.d.ts +29 -0
  11. package/types/2d/text/CharInfo.d.ts +20 -1
  12. package/types/2d/text/CharRenderInfo.d.ts +15 -1
  13. package/types/2d/text/Font.d.ts +10 -0
  14. package/types/2d/text/SubFont.d.ts +35 -1
  15. package/types/2d/text/TextRenderer.d.ts +53 -0
  16. package/types/2d/text/TextUtils.d.ts +89 -1
  17. package/types/Background.d.ts +17 -0
  18. package/types/BasicResources.d.ts +52 -0
  19. package/types/Camera.d.ts +71 -1
  20. package/types/Canvas.d.ts +13 -0
  21. package/types/Component.d.ts +33 -0
  22. package/types/ComponentsDependencies.d.ts +34 -1
  23. package/types/ComponentsManager.d.ts +17 -0
  24. package/types/Engine.d.ts +106 -2
  25. package/types/Entity.d.ts +88 -0
  26. package/types/Polyfill.d.ts +12 -1
  27. package/types/RenderPipeline/BasicRenderPipeline.d.ts +3 -0
  28. package/types/RenderPipeline/BatcherManager.d.ts +23 -1
  29. package/types/RenderPipeline/CullingResults.d.ts +17 -1
  30. package/types/RenderPipeline/DepthOnlyPass.d.ts +18 -1
  31. package/types/RenderPipeline/InstanceBuffer.d.ts +28 -1
  32. package/types/RenderPipeline/MaskManager.d.ts +36 -1
  33. package/types/RenderPipeline/OpaqueTexturePass.d.ts +16 -1
  34. package/types/RenderPipeline/PipelineUtils.d.ts +11 -1
  35. package/types/RenderPipeline/PrimitiveChunk.d.ts +27 -1
  36. package/types/RenderPipeline/PrimitiveChunkManager.d.ts +16 -1
  37. package/types/RenderPipeline/RenderContext.d.ts +46 -1
  38. package/types/RenderPipeline/RenderElement.d.ts +9 -0
  39. package/types/RenderPipeline/RenderQueue.d.ts +23 -1
  40. package/types/RenderPipeline/RenderTargetPool.d.ts +17 -1
  41. package/types/RenderPipeline/SubPrimitiveChunk.d.ts +14 -1
  42. package/types/RenderPipeline/VertexArea.d.ts +10 -1
  43. package/types/RenderPipeline/VertexMergeBatcher.d.ts +11 -1
  44. package/types/RenderPipeline/enums/RenderQueueMaskType.d.ts +9 -1
  45. package/types/RenderPipeline/index.d.ts +2 -0
  46. package/types/Renderer.d.ts +58 -0
  47. package/types/Scene.d.ts +28 -0
  48. package/types/SceneManager.d.ts +13 -0
  49. package/types/Script.d.ts +40 -0
  50. package/types/SystemInfo.d.ts +10 -0
  51. package/types/Transform.d.ts +13 -0
  52. package/types/UpdateFlag.d.ts +3 -0
  53. package/types/UpdateFlagManager.d.ts +41 -1
  54. package/types/Utils.d.ts +20 -0
  55. package/types/VirtualCamera.d.ts +16 -1
  56. package/types/animation/AnimationClip.d.ts +5 -0
  57. package/types/animation/AnimationClipCurveBinding.d.ts +16 -1
  58. package/types/animation/Animator.d.ts +25 -0
  59. package/types/animation/AnimatorController.d.ts +17 -0
  60. package/types/animation/AnimatorControllerLayer.d.ts +9 -0
  61. package/types/animation/AnimatorControllerParameter.d.ts +4 -0
  62. package/types/animation/AnimatorState.d.ts +44 -0
  63. package/types/animation/AnimatorStateInstance.d.ts +8 -0
  64. package/types/animation/AnimatorStateMachine.d.ts +14 -0
  65. package/types/animation/AnimatorStateTransition.d.ts +9 -0
  66. package/types/animation/AnimatorStateTransitionCollection.d.ts +23 -1
  67. package/types/animation/StateMachineScript.d.ts +2 -0
  68. package/types/animation/animationCurve/AnimationArrayCurve.d.ts +39 -0
  69. package/types/animation/animationCurve/AnimationBoolCurve.d.ts +39 -0
  70. package/types/animation/animationCurve/AnimationColorCurve.d.ts +39 -0
  71. package/types/animation/animationCurve/AnimationCurve.d.ts +8 -0
  72. package/types/animation/animationCurve/AnimationFloatArrayCurve.d.ts +38 -0
  73. package/types/animation/animationCurve/AnimationFloatCurve.d.ts +39 -0
  74. package/types/animation/animationCurve/AnimationQuaternionCurve.d.ts +41 -0
  75. package/types/animation/animationCurve/AnimationRectCurve.d.ts +18 -0
  76. package/types/animation/animationCurve/AnimationRefCurve.d.ts +18 -0
  77. package/types/animation/animationCurve/AnimationStringCurve.d.ts +39 -0
  78. package/types/animation/animationCurve/AnimationVector2Curve.d.ts +39 -0
  79. package/types/animation/animationCurve/AnimationVector3Curve.d.ts +43 -0
  80. package/types/animation/animationCurve/AnimationVector4Curve.d.ts +39 -0
  81. package/types/animation/animationCurve/interfaces/IAnimationCurveCalculator.d.ts +18 -1
  82. package/types/animation/enums/AnimatorStatePlayState.d.ts +8 -1
  83. package/types/animation/internal/AnimationCurveLayerOwner.d.ts +15 -1
  84. package/types/animation/internal/AnimationEventHandler.d.ts +8 -1
  85. package/types/animation/internal/AnimatorLayerData.d.ts +28 -1
  86. package/types/animation/internal/AnimatorStateData.d.ts +14 -1
  87. package/types/animation/internal/AnimatorStatePlayData.d.ts +27 -1
  88. package/types/animation/internal/AnimatorTempValue.d.ts +12 -1
  89. package/types/animation/internal/animationCurveOwner/AnimationCurveOwner.d.ts +39 -0
  90. package/types/animation/internal/animationCurveOwner/assembler/BlendShapeWeightsAnimationCurveOwnerAssembler.d.ts +12 -1
  91. package/types/animation/internal/animationCurveOwner/assembler/IAnimationCurveOwnerAssembler.d.ts +10 -1
  92. package/types/animation/internal/animationCurveOwner/assembler/PositionAnimationCurveOwnerAssembler.d.ts +13 -1
  93. package/types/animation/internal/animationCurveOwner/assembler/RotationAnimationCurveOwnerAssembler.d.ts +13 -1
  94. package/types/animation/internal/animationCurveOwner/assembler/ScaleAnimationCurveOwnerAssembler.d.ts +13 -1
  95. package/types/animation/internal/animationCurveOwner/assembler/UniversalAnimationCurveOwnerAssembler.d.ts +23 -1
  96. package/types/asset/GraphicsResource.d.ts +10 -0
  97. package/types/asset/IReferable.d.ts +8 -0
  98. package/types/asset/ReferResource.d.ts +28 -0
  99. package/types/asset/RenderingStatistics.d.ts +8 -0
  100. package/types/asset/ResourceManager.d.ts +94 -4
  101. package/types/audio/AudioClip.d.ts +8 -0
  102. package/types/audio/AudioManager.d.ts +14 -0
  103. package/types/audio/AudioSource.d.ts +17 -0
  104. package/types/base/EngineObject.d.ts +4 -0
  105. package/types/base/Time.d.ts +13 -0
  106. package/types/clone/CloneDecorators.d.ts +20 -0
  107. package/types/clone/CloneUtil.d.ts +30 -1
  108. package/types/clone/ComponentCloner.d.ts +11 -1
  109. package/types/enums/CameraType.d.ts +9 -1
  110. package/types/env-probe/CubeProbe.d.ts +2 -0
  111. package/types/graphic/Buffer.d.ts +10 -0
  112. package/types/graphic/BufferUtil.d.ts +5 -0
  113. package/types/graphic/IndexBufferBinding.d.ts +4 -0
  114. package/types/graphic/Mesh.d.ts +54 -0
  115. package/types/graphic/Primitive.d.ts +50 -1
  116. package/types/graphic/TransformFeedback.d.ts +46 -1
  117. package/types/graphic/TransformFeedbackPrimitive.d.ts +67 -1
  118. package/types/graphic/TransformFeedbackSimulator.d.ts +55 -1
  119. package/types/graphic/VertexBufferBinding.d.ts +4 -0
  120. package/types/input/InputManager.d.ts +19 -0
  121. package/types/input/enums/PointerButton.d.ts +8 -0
  122. package/types/input/keyboard/KeyboardManager.d.ts +41 -1
  123. package/types/input/pointer/Pointer.d.ts +36 -0
  124. package/types/input/pointer/PointerEventData.d.ts +4 -0
  125. package/types/input/pointer/PointerManager.d.ts +58 -0
  126. package/types/input/pointer/emitter/IHitResult.d.ts +11 -1
  127. package/types/input/pointer/emitter/PhysicsPointerEventEmitter.d.ts +20 -1
  128. package/types/input/wheel/WheelManager.d.ts +34 -1
  129. package/types/lighting/AmbientLight.d.ts +9 -0
  130. package/types/lighting/DirectLight.d.ts +17 -0
  131. package/types/lighting/Light.d.ts +2 -0
  132. package/types/lighting/LightManager.d.ts +57 -0
  133. package/types/lighting/PointLight.d.ts +17 -0
  134. package/types/lighting/SpotLight.d.ts +17 -0
  135. package/types/lighting/ambientOcclusion/AmbientOcclusion.d.ts +4 -0
  136. package/types/lighting/ambientOcclusion/ScalableAmbientObscurancePass.d.ts +38 -1
  137. package/types/material/BaseMaterial.d.ts +4 -0
  138. package/types/material/Material.d.ts +2 -0
  139. package/types/mesh/BlendShape.d.ts +13 -0
  140. package/types/mesh/BlendShapeFrame.d.ts +7 -0
  141. package/types/mesh/BlendShapeManager.d.ts +101 -1
  142. package/types/mesh/MeshRenderer.d.ts +37 -0
  143. package/types/mesh/ModelMesh.d.ts +18 -0
  144. package/types/mesh/PrimitiveMesh.d.ts +31 -3
  145. package/types/mesh/PrimitiveMeshRestorer.d.ts +107 -0
  146. package/types/mesh/Skin.d.ts +10 -0
  147. package/types/mesh/SkinnedMeshRenderer.d.ts +21 -0
  148. package/types/particle/ParticleBufferUtils.d.ts +26 -1
  149. package/types/particle/ParticleGenerator.d.ts +102 -0
  150. package/types/particle/ParticleRenderer.d.ts +55 -0
  151. package/types/particle/ParticleTransformFeedbackSimulator.d.ts +52 -1
  152. package/types/particle/enums/ParticleRandomSubSeeds.d.ts +25 -1
  153. package/types/particle/enums/attributes/BillboardParticleVertexAttribute.d.ts +6 -1
  154. package/types/particle/enums/attributes/ParticleFeedbackVertexAttribute.d.ts +8 -1
  155. package/types/particle/enums/attributes/ParticleInstanceVertexAttribute.d.ts +17 -1
  156. package/types/particle/modules/ColorOverLifetimeModule.d.ts +12 -0
  157. package/types/particle/modules/CustomDataModule.d.ts +5 -0
  158. package/types/particle/modules/EmissionModule.d.ts +28 -0
  159. package/types/particle/modules/ForceOverLifetimeModule.d.ts +16 -1
  160. package/types/particle/modules/LimitVelocityOverLifetimeModule.d.ts +20 -1
  161. package/types/particle/modules/MainModule.d.ts +33 -1
  162. package/types/particle/modules/NoiseModule.d.ts +12 -1
  163. package/types/particle/modules/ParticleCompositeCurve.d.ts +37 -0
  164. package/types/particle/modules/ParticleCurve.d.ts +28 -0
  165. package/types/particle/modules/ParticleGeneratorModule.d.ts +7 -0
  166. package/types/particle/modules/ParticleGradient.d.ts +16 -0
  167. package/types/particle/modules/RotationOverLifetimeModule.d.ts +12 -0
  168. package/types/particle/modules/SizeOverLifetimeModule.d.ts +16 -0
  169. package/types/particle/modules/SubEmitter.d.ts +3 -0
  170. package/types/particle/modules/SubEmittersModule.d.ts +17 -0
  171. package/types/particle/modules/TextureSheetAnimationModule.d.ts +14 -1
  172. package/types/particle/modules/VelocityOverLifetimeModule.d.ts +28 -1
  173. package/types/particle/modules/shape/BaseShape.d.ts +33 -1
  174. package/types/particle/modules/shape/BoxShape.d.ts +13 -1
  175. package/types/particle/modules/shape/CircleShape.d.ts +13 -0
  176. package/types/particle/modules/shape/ConeShape.d.ts +13 -0
  177. package/types/particle/modules/shape/HemisphereShape.d.ts +13 -0
  178. package/types/particle/modules/shape/MeshShape.d.ts +17 -0
  179. package/types/particle/modules/shape/ShapeUtils.d.ts +13 -1
  180. package/types/particle/modules/shape/SphereShape.d.ts +13 -0
  181. package/types/physics/CharacterController.d.ts +21 -0
  182. package/types/physics/Collider.d.ts +39 -0
  183. package/types/physics/Collision.d.ts +3 -0
  184. package/types/physics/DynamicCollider.d.ts +14 -0
  185. package/types/physics/PhysicsMaterial.d.ts +3 -0
  186. package/types/physics/PhysicsScene.d.ts +51 -0
  187. package/types/physics/StaticCollider.d.ts +5 -0
  188. package/types/physics/enums/ColliderShapeChangeFlag.d.ts +8 -1
  189. package/types/physics/enums/HingeJointFlag.d.ts +14 -1
  190. package/types/physics/joint/HingeJoint.d.ts +4 -0
  191. package/types/physics/joint/Joint.d.ts +20 -0
  192. package/types/physics/joint/JointLimits.d.ts +3 -0
  193. package/types/physics/joint/JointMotor.d.ts +3 -0
  194. package/types/physics/shape/ColliderShape.d.ts +17 -0
  195. package/types/physics/shape/MeshColliderShape.d.ts +4 -0
  196. package/types/postProcess/FinalPass.d.ts +19 -1
  197. package/types/postProcess/PostProcess.d.ts +2 -0
  198. package/types/postProcess/PostProcessEffect.d.ts +4 -0
  199. package/types/postProcess/PostProcessEffectParameter.d.ts +4 -0
  200. package/types/postProcess/PostProcessManager.d.ts +43 -0
  201. package/types/postProcess/effects/BloomEffect.d.ts +25 -0
  202. package/types/postProcess/effects/TonemappingEffect.d.ts +3 -0
  203. package/types/renderingHardwareInterface/IPlatformTransformFeedback.d.ts +36 -1
  204. package/types/renderingHardwareInterface/IPlatformTransformFeedbackPrimitive.d.ts +40 -1
  205. package/types/shader/Shader.d.ts +22 -0
  206. package/types/shader/ShaderBlockProperty.d.ts +19 -1
  207. package/types/shader/ShaderData.d.ts +29 -0
  208. package/types/shader/ShaderFactory.d.ts +23 -0
  209. package/types/shader/ShaderMacro.d.ts +15 -0
  210. package/types/shader/ShaderMacroCollection.d.ts +57 -1
  211. package/types/shader/ShaderMacroProcessor.d.ts +72 -1
  212. package/types/shader/ShaderPass.d.ts +38 -0
  213. package/types/shader/ShaderProgram.d.ts +91 -1
  214. package/types/shader/ShaderProgramMap.d.ts +20 -1
  215. package/types/shader/ShaderProperty.d.ts +17 -0
  216. package/types/shader/ShaderTagKey.d.ts +2 -0
  217. package/types/shader/ShaderUniform.d.ts +49 -1
  218. package/types/shader/ShaderUniformBlock.d.ts +9 -1
  219. package/types/shader/enums/ConstantBufferBindingPoint.d.ts +7 -1
  220. package/types/shader/state/BlendState.d.ts +14 -0
  221. package/types/shader/state/DepthState.d.ts +14 -0
  222. package/types/shader/state/RasterState.d.ts +17 -0
  223. package/types/shader/state/RenderState.d.ts +11 -0
  224. package/types/shader/state/StencilState.d.ts +13 -0
  225. package/types/shadow/CascadedShadowCasterPass.d.ts +5 -0
  226. package/types/shadow/ShadowSliceData.d.ts +13 -1
  227. package/types/shadow/ShadowUtils.d.ts +43 -1
  228. package/types/sky/Sky.d.ts +9 -0
  229. package/types/texture/RenderTarget.d.ts +21 -0
  230. package/types/texture/Texture.d.ts +21 -0
  231. package/types/texture/Texture2D.d.ts +4 -0
  232. package/types/texture/Texture2DArray.d.ts +4 -0
  233. package/types/texture/TextureCube.d.ts +4 -0
  234. package/types/texture/TextureUtils.d.ts +16 -1
  235. package/types/trail/TrailRenderer.d.ts +5 -0
  236. package/types/ui/IUICanvas.d.ts +16 -1
  237. package/types/utils/DisorderedArray.d.ts +2 -0
  238. package/types/xr/XRManager.d.ts +28 -0
@@ -1 +1,36 @@
1
- export {};
1
+ import { SpriteMask } from "../2d";
2
+ import { SpriteMaskLayer } from "../enums/SpriteMaskLayer";
3
+ import { Material } from "../material";
4
+ import { RenderContext } from "./RenderContext";
5
+ import { RenderQueue } from "./RenderQueue";
6
+ /**
7
+ * @internal
8
+ */
9
+ export declare class MaskManager {
10
+ private static _stencilEnabledProp;
11
+ private static _stencilWriteMaskProp;
12
+ private static _stencilMaskProp;
13
+ private static _stencilCompareFunctionFrontProp;
14
+ private static _stencilCompareFunctionBackProp;
15
+ private static _stencilPassOperationFrontProp;
16
+ private static _stencilPassOperationBackProp;
17
+ private static _stencilFailOperationFrontProp;
18
+ private static _stencilFailOperationBackProp;
19
+ private static _stencilZFailOperationFrontProp;
20
+ private static _stencilZFailOperationBackProp;
21
+ private static _maskIncrementRenderQueue;
22
+ private static _maskDecrementRenderQueue;
23
+ static getMaskIncrementRenderQueue(): RenderQueue;
24
+ static getMaskDecrementRenderQueue(): RenderQueue;
25
+ hasStencilWritten: boolean;
26
+ private _preMaskLayer;
27
+ private _allSpriteMasks;
28
+ addSpriteMask(mask: SpriteMask): void;
29
+ removeSpriteMask(mask: SpriteMask): void;
30
+ drawMask(context: RenderContext, pipelineStageTagValue: string, maskLayer: SpriteMaskLayer): void;
31
+ clearMask(context: RenderContext, pipelineStageTagValue: string): void;
32
+ isStencilWritten(material: Material): boolean;
33
+ isReadStencil(material: Material): boolean;
34
+ destroy(): void;
35
+ private _buildMaskRenderElement;
36
+ }
@@ -1 +1,16 @@
1
- export {};
1
+ import { Camera } from "../Camera";
2
+ import { Engine } from "../Engine";
3
+ import { Texture } from "../texture";
4
+ import { PipelinePass } from "./PipelinePass";
5
+ import { RenderContext } from "./RenderContext";
6
+ /**
7
+ * @internal
8
+ * Opaque texture pass.
9
+ */
10
+ export declare class OpaqueTexturePass extends PipelinePass {
11
+ private _cameraColorTexture;
12
+ private _renderTarget;
13
+ constructor(engine: Engine);
14
+ onConfig(camera: Camera, cameraColorTexture: Texture): void;
15
+ onRender(context: RenderContext): void;
16
+ }
@@ -1 +1,11 @@
1
- export {};
1
+ import { Vector4 } from "@galacean/engine-math";
2
+ import { Engine } from "../Engine";
3
+ import { RenderTarget, Texture2D, TextureFilterMode, TextureFormat, TextureWrapMode } from "../texture";
4
+ /**
5
+ * @internal
6
+ */
7
+ export declare class PipelineUtils {
8
+ static readonly defaultViewport: Vector4;
9
+ static recreateTextureIfNeeded(engine: Engine, currentTexture: Texture2D | null, width: number, height: number, format: TextureFormat, mipmap: boolean, isSRGBColorSpace: boolean, textureWrapMode: TextureWrapMode, textureFilterMode: TextureFilterMode): Texture2D;
10
+ static recreateRenderTargetIfNeeded(engine: Engine, currentRenderTarget: RenderTarget | null, width: number, height: number, colorFormat: TextureFormat | null, depthFormat: TextureFormat | null, needDepthTexture: boolean, mipmap: boolean, isSRGBColorSpace: boolean, antiAliasing: number, textureWrapMode: TextureWrapMode, textureFilterMode: TextureFilterMode): RenderTarget;
11
+ }
@@ -1 +1,27 @@
1
- export {};
1
+ import { Engine } from "../Engine";
2
+ import { Primitive, SubMesh } from "../graphic";
3
+ import { ReturnableObjectPool } from "../utils/ReturnableObjectPool";
4
+ import { SubPrimitiveChunk } from "./SubPrimitiveChunk";
5
+ import { VertexArea } from "./VertexArea";
6
+ /**
7
+ * @internal
8
+ */
9
+ export declare class PrimitiveChunk {
10
+ static areaPool: ReturnableObjectPool<VertexArea>;
11
+ static subChunkPool: ReturnableObjectPool<SubPrimitiveChunk>;
12
+ static subMeshPool: ReturnableObjectPool<SubMesh>;
13
+ primitive: Primitive;
14
+ vertices: Float32Array;
15
+ indices: Uint16Array;
16
+ updateVertexStart: number;
17
+ updateVertexEnd: number;
18
+ updateIndexLength: number;
19
+ vertexFreeAreas: Array<VertexArea>;
20
+ constructor(engine: Engine, maxVertexCount: number);
21
+ allocateSubChunk(vertexCount: number): SubPrimitiveChunk | null;
22
+ freeSubChunk(subChunk: SubPrimitiveChunk): void;
23
+ uploadBuffer(): void;
24
+ destroy(): void;
25
+ private _allocateArea;
26
+ private _freeArea;
27
+ }
@@ -1 +1,16 @@
1
- export {};
1
+ import { Engine } from "../Engine";
2
+ import { PrimitiveChunk } from "./PrimitiveChunk";
3
+ import { SubPrimitiveChunk } from "./SubPrimitiveChunk";
4
+ /**
5
+ * @internal
6
+ */
7
+ export declare class PrimitiveChunkManager {
8
+ engine: Engine;
9
+ maxVertexCount: number;
10
+ primitiveChunks: PrimitiveChunk[];
11
+ constructor(engine: Engine, maxVertexCount?: number);
12
+ allocateSubChunk(vertexCount: number): SubPrimitiveChunk;
13
+ freeSubChunk(subChunk: SubPrimitiveChunk): void;
14
+ uploadBuffer(): void;
15
+ destroy(): void;
16
+ }
@@ -1 +1,46 @@
1
- export {};
1
+ import { Matrix, Vector4 } from "@galacean/engine-math";
2
+ import { Camera } from "../Camera";
3
+ import { VirtualCamera } from "../VirtualCamera";
4
+ import { ReplacementFailureStrategy } from "../enums/ReplacementFailureStrategy";
5
+ import { Shader, ShaderProperty } from "../shader";
6
+ import { ShaderTagKey } from "../shader/ShaderTagKey";
7
+ import { RenderTarget, TextureCubeFace } from "../texture";
8
+ /**
9
+ * @internal
10
+ */
11
+ export declare class RenderContext {
12
+ static vpMatrixProperty: ShaderProperty;
13
+ static pipelineStageKey: ShaderTagKey;
14
+ /** @internal */
15
+ static _flipYMatrix: Matrix;
16
+ private static _cameraProjectionProperty;
17
+ private static _viewMatrixProperty;
18
+ private static _projectionMatrixProperty;
19
+ private static _flipYProjectionMatrix;
20
+ private static _flipYViewProjectionMatrix;
21
+ private _projectionParams;
22
+ camera: Camera;
23
+ virtualCamera: VirtualCamera;
24
+ replacementShader: Shader;
25
+ replacementTag: ShaderTagKey;
26
+ replacementFailureStrategy: ReplacementFailureStrategy;
27
+ flipProjection: boolean;
28
+ viewMatrix: Matrix;
29
+ projectionMatrix: Matrix;
30
+ viewProjectionMatrix: Matrix;
31
+ applyVirtualCamera(virtualCamera: VirtualCamera, flipProjection: boolean): void;
32
+ setRenderTarget(destination: RenderTarget | null, viewport: Vector4, mipLevel?: number, faceIndex?: TextureCubeFace): void;
33
+ garbageCollection(): void;
34
+ }
35
+ /**
36
+ * @internal
37
+ */
38
+ export declare enum ContextRendererUpdateFlag {
39
+ None = 0,
40
+ WorldMatrix = 1,
41
+ viewMatrix = 2,
42
+ ProjectionMatrix = 4,
43
+ WorldViewMatrix = 3,
44
+ viewProjectionMatrix = 6,
45
+ All = 7
46
+ }
@@ -16,8 +16,17 @@ export declare class RenderElement implements IPoolElement {
16
16
  shaderData?: ShaderData;
17
17
  instancedRenderers: Renderer[];
18
18
  subDistancePriority: number;
19
+ /** @internal Marks a batch leader — a self-contained draw range that must not be merged again downstream */
20
+ _isBatched: boolean;
19
21
  texture?: Texture2D;
20
22
  subChunk?: SubPrimitiveChunk;
21
23
  set(component: Renderer, material: Material, primitive: Primitive, subPrimitive: SubMesh, texture?: Texture2D, subChunk?: SubPrimitiveChunk): void;
24
+ /**
25
+ * @internal
26
+ * Copy identity fields from `source` and reset per-queue batch state, so the same
27
+ * logical element can live in multiple queues (e.g. an Opaque + Transparent multi-pass
28
+ * material) without one queue's batching corrupting another's `instancedRenderers`.
29
+ */
30
+ _cloneFrom(source: RenderElement): void;
22
31
  dispose(): void;
23
32
  }
@@ -1 +1,23 @@
1
- export {};
1
+ import { RenderQueueType } from "../shader";
2
+ import { BatcherManager } from "./BatcherManager";
3
+ import { ContextRendererUpdateFlag, RenderContext } from "./RenderContext";
4
+ import { RenderElement } from "./RenderElement";
5
+ import { RenderQueueMaskType } from "./enums/RenderQueueMaskType";
6
+ /**
7
+ * @internal
8
+ */
9
+ export declare class RenderQueue {
10
+ renderQueueType: RenderQueueType;
11
+ static compareForOpaque(a: RenderElement, b: RenderElement): number;
12
+ static compareForTransparent(a: RenderElement, b: RenderElement): number;
13
+ readonly elements: RenderElement[];
14
+ readonly batchedElements: RenderElement[];
15
+ rendererUpdateFlag: ContextRendererUpdateFlag;
16
+ constructor(renderQueueType: RenderQueueType);
17
+ pushRenderElement(element: RenderElement): void;
18
+ sortBatch(compareFunc: Function, batcherManager: BatcherManager): void;
19
+ batch(batcherManager: BatcherManager): void;
20
+ render(context: RenderContext, pipelineStageTagValue: string, maskType?: RenderQueueMaskType): void;
21
+ clear(): void;
22
+ destroy(): void;
23
+ }
@@ -1 +1,17 @@
1
- export {};
1
+ import { Engine } from "../Engine";
2
+ import { RenderTarget, Texture2D, TextureFilterMode, TextureFormat, TextureWrapMode } from "../texture";
3
+ /**
4
+ * @internal
5
+ */
6
+ export declare class RenderTargetPool {
7
+ private _freeRenderTargets;
8
+ private _freeTextures;
9
+ private _engine;
10
+ constructor(engine: Engine);
11
+ allocateRenderTarget(width: number, height: number, colorFormat: TextureFormat | null, depthFormat: TextureFormat | null, needDepthTexture: boolean, mipmap: boolean, isSRGBColorSpace: boolean, antiAliasing: number, wrapMode: TextureWrapMode, filterMode: TextureFilterMode): RenderTarget;
12
+ allocateTexture(width: number, height: number, format: TextureFormat, mipmap: boolean, isSRGBColorSpace: boolean, wrapMode: TextureWrapMode, filterMode: TextureFilterMode): Texture2D;
13
+ freeRenderTarget(renderTarget: RenderTarget): void;
14
+ freeTexture(texture: Texture2D): void;
15
+ gc(): void;
16
+ private static _matchRenderTarget;
17
+ }
@@ -1 +1,14 @@
1
- export {};
1
+ import { SubMesh } from "../graphic";
2
+ import { IPoolElement } from "../utils/ObjectPool";
3
+ import { VertexArea } from "./VertexArea";
4
+ import { PrimitiveChunk } from "./PrimitiveChunk";
5
+ /**
6
+ * @internal
7
+ */
8
+ export declare class SubPrimitiveChunk implements IPoolElement {
9
+ chunk: PrimitiveChunk;
10
+ vertexArea: VertexArea;
11
+ subMesh: SubMesh;
12
+ indices: number[];
13
+ dispose?(): void;
14
+ }
@@ -1 +1,10 @@
1
- export {};
1
+ import { IPoolElement } from "../utils/ObjectPool";
2
+ /**
3
+ * @internal
4
+ */
5
+ export declare class VertexArea implements IPoolElement {
6
+ start?: number;
7
+ size?: number;
8
+ constructor(start?: number, size?: number);
9
+ dispose?(): void;
10
+ }
@@ -1 +1,11 @@
1
- export {};
1
+ import { ShaderTagKey } from "../shader";
2
+ import { RenderElement } from "./RenderElement";
3
+ /**
4
+ * @internal
5
+ */
6
+ export declare class VertexMergeBatcher {
7
+ protected static _disableBatchTag: ShaderTagKey;
8
+ static canBatchSprite(preElement: RenderElement, curElement: RenderElement): boolean;
9
+ static canBatchSpriteMask(preElement: RenderElement, curElement: RenderElement): boolean;
10
+ static batch(preElement: RenderElement | null, curElement: RenderElement): void;
11
+ }
@@ -1 +1,9 @@
1
- export {};
1
+ /**
2
+ * @internal
3
+ * Render queue mask type.
4
+ */
5
+ export declare enum RenderQueueMaskType {
6
+ No = 0,
7
+ Increment = 1,
8
+ Decrement = 2
9
+ }
@@ -1,5 +1,7 @@
1
1
  export { BasicRenderPipeline, RenderQueueFlags } from "./BasicRenderPipeline";
2
2
  export { VertexMergeBatcher } from "./VertexMergeBatcher";
3
+ /** @internal */
4
+ export type { PrimitiveChunkManager } from "./PrimitiveChunkManager";
3
5
  export { Blitter } from "./Blitter";
4
6
  export { RenderElement } from "./RenderElement";
5
7
  export { RenderQueue } from "./RenderQueue";
@@ -1,23 +1,41 @@
1
1
  import { BoundingBox, Vector4 } from "@galacean/engine-math";
2
+ import { SpriteMaskInteraction } from "./2d/enums/SpriteMaskInteraction";
2
3
  import { Component } from "./Component";
3
4
  import { Entity } from "./Entity";
4
5
  import { RenderContext } from "./RenderPipeline/RenderContext";
6
+ import { RenderElement } from "./RenderPipeline/RenderElement";
5
7
  import { TransformModifyFlags } from "./Transform";
6
8
  import type { ICloneHook } from "./clone/ICloneHook";
7
9
  import { SpriteMaskLayer } from "./enums/SpriteMaskLayer";
8
10
  import { Material } from "./material";
11
+ import { ShaderProperty } from "./shader";
9
12
  import { ShaderData } from "./shader/ShaderData";
13
+ import { ShaderMacroCollection } from "./shader/ShaderMacroCollection";
10
14
  /**
11
15
  * Basis for all renderers.
12
16
  * @decorator `@dependentComponents(Transform, DependentMode.CheckOnly)`
13
17
  */
14
18
  export declare class Renderer extends Component implements ICloneHook<Renderer> {
15
19
  private static _tempVector0;
20
+ /** @internal */
21
+ static _worldMatrixProperty: ShaderProperty;
22
+ /** @internal */
23
+ static _rendererLayerProperty: ShaderProperty;
16
24
  private static _receiveShadowMacro;
17
25
  private static _mvMatrixProperty;
18
26
  private static _mvpMatrixProperty;
19
27
  private static _normalMatrixProperty;
28
+ /** @internal */
29
+ _distanceForSort: number;
30
+ /** @internal */
31
+ _onUpdateIndex: number;
32
+ /** @internal */
33
+ _rendererIndex: number;
34
+ /** @internal */
35
+ _globalShaderMacro: ShaderMacroCollection;
20
36
  _renderFrameCount: number;
37
+ /** @internal */
38
+ _maskInteraction: SpriteMaskInteraction;
21
39
  _maskLayer: SpriteMaskLayer;
22
40
  protected _overrideUpdate: boolean;
23
41
  protected _materials: Material[];
@@ -61,6 +79,10 @@ export declare class Renderer extends Component implements ICloneHook<Renderer>
61
79
  */
62
80
  get priority(): number;
63
81
  set priority(value: number);
82
+ /**
83
+ * @internal
84
+ */
85
+ constructor(entity: Entity);
64
86
  /**
65
87
  * Get the first instance material.
66
88
  * @returns The first instance material
@@ -112,10 +134,42 @@ export declare class Renderer extends Component implements ICloneHook<Renderer>
112
134
  */
113
135
  setMaterials(materials: Material[]): void;
114
136
  update(deltaTime: number): void;
137
+ /**
138
+ * @internal
139
+ */
140
+ _onEnableInScene(): void;
141
+ /**
142
+ * @internal
143
+ */
144
+ _onDisableInScene(): void;
145
+ /**
146
+ * @internal
147
+ */
148
+ _prepareRender(context: RenderContext): void;
115
149
  /**
116
150
  * @inheritdoc
117
151
  */
118
152
  _onClone(target: Renderer): void;
153
+ /**
154
+ * @internal
155
+ */
156
+ _isFrontFaceInvert(): boolean;
157
+ /**
158
+ * @internal
159
+ */
160
+ protected _onDestroy(): void;
161
+ /**
162
+ * @internal
163
+ */
164
+ _updateTransformShaderData(context: RenderContext, onlyMVP: boolean): void;
165
+ /**
166
+ * @internal
167
+ */
168
+ _canBatch(preElement: RenderElement, curElement: RenderElement): boolean;
169
+ /**
170
+ * @internal
171
+ */
172
+ _batch(preElement: RenderElement | null, curElement: RenderElement): void;
119
173
  /**
120
174
  * Update once per frame per renderer.
121
175
  */
@@ -125,6 +179,10 @@ export declare class Renderer extends Component implements ICloneHook<Renderer>
125
179
  * Vertices are already in world space, so model matrix is identity.
126
180
  */
127
181
  protected _updateWorldSpaceTransformShaderData(context: RenderContext, onlyMVP: boolean): void;
182
+ /**
183
+ * @internal
184
+ */
185
+ protected _setTransformEntity(entity: Entity): void;
128
186
  protected _updateBounds(worldBounds: BoundingBox): void;
129
187
  protected _render(context: RenderContext): void;
130
188
  private _createInstanceMaterial;
package/types/Scene.d.ts CHANGED
@@ -1,11 +1,15 @@
1
1
  import { Color, Vector3 } from "@galacean/engine-math";
2
2
  import { Background } from "./Background";
3
+ import { ComponentsManager } from "./ComponentsManager";
3
4
  import { Engine } from "./Engine";
4
5
  import { Entity } from "./Entity";
6
+ import { MaskManager } from "./RenderPipeline/MaskManager";
7
+ import { SceneManager } from "./SceneManager";
5
8
  import { EngineObject } from "./base";
6
9
  import { FogMode } from "./enums/FogMode";
7
10
  import { AmbientOcclusion, DirectLight } from "./lighting";
8
11
  import { AmbientLight } from "./lighting/AmbientLight";
12
+ import { LightManager } from "./lighting/LightManager";
9
13
  import { PhysicsScene } from "./physics/PhysicsScene";
10
14
  import { PostProcessManager } from "./postProcess";
11
15
  import { ShaderData } from "./shader/ShaderData";
@@ -46,6 +50,18 @@ export declare class Scene extends EngineObject {
46
50
  * such as corners, crevices, and contact points between surfaces.
47
51
  */
48
52
  readonly ambientOcclusion: AmbientOcclusion;
53
+ /** @internal */
54
+ _lightManager: LightManager;
55
+ /** @internal */
56
+ _componentsManager: ComponentsManager;
57
+ /** @internal */
58
+ _maskManager: MaskManager;
59
+ /** @internal */
60
+ _isActiveInEngine: boolean;
61
+ /** @internal */
62
+ _sceneManager: SceneManager;
63
+ /** @internal */
64
+ _rootEntities: Entity[];
49
65
  private _background;
50
66
  private _shaderData;
51
67
  private _shadowCascades;
@@ -177,6 +193,18 @@ export declare class Scene extends EngineObject {
177
193
  * @returns Entity
178
194
  */
179
195
  findEntityByPath(path: string): Entity | null;
196
+ /**
197
+ * @internal
198
+ */
199
+ _processActive(active: boolean): void;
200
+ /**
201
+ * @internal
202
+ */
203
+ _updateShaderData(): void;
204
+ /**
205
+ * @internal
206
+ */
207
+ protected _onDestroy(): void;
180
208
  private _computeLinearFogParams;
181
209
  private _computeExponentialFogParams;
182
210
  private _getSunlight;
@@ -1,15 +1,24 @@
1
1
  import { Engine } from "./Engine";
2
2
  import { Scene } from "./Scene";
3
3
  import { AssetPromise } from "./asset/AssetPromise";
4
+ import { SafeLoopArray } from "./utils/SafeLoopArray";
4
5
  /**
5
6
  * Scene manager.
6
7
  */
7
8
  export declare class SceneManager {
8
9
  readonly engine: Engine;
10
+ /** @internal */
11
+ _allCreatedScenes: Scene[];
12
+ /** @internal */
13
+ _scenes: SafeLoopArray<Scene>;
9
14
  /**
10
15
  * Get the scene list.
11
16
  */
12
17
  get scenes(): ReadonlyArray<Scene>;
18
+ /**
19
+ * @internal
20
+ */
21
+ constructor(engine: Engine);
13
22
  /**
14
23
  * Add scene.
15
24
  * @param scene - The scene which want to be added
@@ -40,6 +49,10 @@ export declare class SceneManager {
40
49
  * @param destScene - target scene
41
50
  */
42
51
  mergeScenes(sourceScene: Scene, destScene: Scene): void;
52
+ /**
53
+ * @internal
54
+ */
55
+ _destroyAllScene(): void;
43
56
  /**
44
57
  * @deprecated
45
58
  * Please use `scenes` instead.
package/types/Script.d.ts CHANGED
@@ -7,6 +7,22 @@ import { Collision } from "./physics/Collision";
7
7
  * Script class, used for logic writing.
8
8
  */
9
9
  export declare class Script extends Component {
10
+ /** @internal */
11
+ _started: boolean;
12
+ /** @internal */
13
+ _onStartIndex: number;
14
+ /** @internal */
15
+ _onUpdateIndex: number;
16
+ /** @internal */
17
+ _onLateUpdateIndex: number;
18
+ /** @internal */
19
+ _onPhysicsUpdateIndex: number;
20
+ /** @internal */
21
+ _onPreRenderIndex: number;
22
+ /** @internal */
23
+ _onPostRenderIndex: number;
24
+ /** @internal */
25
+ _entityScriptsIndex: number;
10
26
  /**
11
27
  * Called when be enabled first time, only once.
12
28
  */
@@ -130,6 +146,30 @@ export declare class Script extends Component {
130
146
  * Called at the end of the destroyed frame.
131
147
  */
132
148
  onDestroy(): void;
149
+ /**
150
+ * @internal
151
+ */
152
+ _onAwake(): void;
153
+ /**
154
+ * @internal
155
+ */
156
+ _onEnable(): void;
157
+ /**
158
+ * @internal
159
+ */
160
+ _onDisable(): void;
161
+ /**
162
+ * @internal
163
+ */
164
+ _onEnableInScene(): void;
165
+ /**
166
+ * @internal
167
+ */
168
+ _onDisableInScene(): void;
169
+ /**
170
+ * @internal
171
+ */
172
+ protected _onDestroy(): void;
133
173
  private _hasCollisionEventCallbacks;
134
174
  }
135
175
  export declare enum PointerMethods {
@@ -10,6 +10,8 @@ export declare class SystemInfo {
10
10
  static platform: Platform;
11
11
  /** The operating system is running on. */
12
12
  static operatingSystem: string;
13
+ /** @internal */
14
+ static _isBrowser: boolean;
13
15
  /** Whether the system support SIMD. */
14
16
  private static _simdSupported;
15
17
  private static _webpSupported;
@@ -18,6 +20,14 @@ export declare class SystemInfo {
18
20
  */
19
21
  static get devicePixelRatio(): number;
20
22
  private static _parseAppleMobileOSVersion;
23
+ /**
24
+ * @internal
25
+ */
26
+ static _initialize(): void;
27
+ /**
28
+ * @internal
29
+ */
30
+ static _detectSIMDSupported(): boolean;
21
31
  static _checkWebpSupported(): AssetPromise<boolean>;
22
32
  /**
23
33
  * Checks whether the system supports the given texture format.
@@ -1,6 +1,7 @@
1
1
  import { Matrix, Quaternion, Vector3 } from "@galacean/engine-math";
2
2
  import { BoolUpdateFlag } from "./BoolUpdateFlag";
3
3
  import { Component } from "./Component";
4
+ import { Entity } from "./Entity";
4
5
  import type { ICloneHook } from "./clone/ICloneHook";
5
6
  /**
6
7
  * Used to implement transformation related functions.
@@ -88,6 +89,10 @@ export declare class Transform extends Component implements ICloneHook<Transform
88
89
  */
89
90
  get worldMatrix(): Matrix;
90
91
  set worldMatrix(value: Matrix);
92
+ /**
93
+ * @internal
94
+ */
95
+ constructor(entity: Entity);
91
96
  /**
92
97
  * Set local position by X, Y, Z value.
93
98
  * @param x - X coordinate
@@ -193,6 +198,14 @@ export declare class Transform extends Component implements ICloneHook<Transform
193
198
  * @param worldUp - Up direction in world space, default is Vector3(0, 1, 0)
194
199
  */
195
200
  lookAt(targetPosition: Vector3, worldUp?: Vector3): void;
201
+ /**
202
+ * @internal
203
+ */
204
+ _parentChange(): void;
205
+ /**
206
+ * @internal
207
+ */
208
+ _isFrontFaceInvert(): boolean;
196
209
  /**
197
210
  * @inheritdoc
198
211
  */
@@ -1,7 +1,10 @@
1
+ import { UpdateFlagManager } from "./UpdateFlagManager";
1
2
  /**
2
3
  * Used to update tags.
3
4
  */
4
5
  export declare abstract class UpdateFlag {
6
+ /** @internal */
7
+ _flagManagers: UpdateFlagManager[];
5
8
  /**
6
9
  * Dispatch.
7
10
  * @param bit - Bit
@@ -1 +1,41 @@
1
- export {};
1
+ import { UpdateFlag } from "./UpdateFlag";
2
+ /**
3
+ * @internal
4
+ */
5
+ export declare class UpdateFlagManager {
6
+ /** Monotonic counter bumped on every `dispatch`; consumers can snapshot it for lazy pull-style cache invalidation. */
7
+ version: number;
8
+ _updateFlags: UpdateFlag[];
9
+ private _listeners;
10
+ /**
11
+ * Create a UpdateFlag.
12
+ * @returns - The UpdateFlag.
13
+ */
14
+ createFlag<T extends UpdateFlag>(type: new () => T): T;
15
+ /**
16
+ * Add a UpdateFlag.
17
+ * @param flag - The UpdateFlag.
18
+ */
19
+ addFlag(flag: UpdateFlag): void;
20
+ /**
21
+ * Remove a UpdateFlag.
22
+ * @param flag - The UpdateFlag.
23
+ */
24
+ removeFlag(flag: UpdateFlag): void;
25
+ /**
26
+ * Add a listener.
27
+ * @param listener - The listener
28
+ */
29
+ addListener(listener: (type?: number, param?: unknown) => void): void;
30
+ /**
31
+ * Remove a listener.
32
+ * @param listener - The listener
33
+ */
34
+ removeListener(listener: (type?: number, param?: unknown) => void): void;
35
+ /**
36
+ * Dispatch a event.
37
+ * @param type - Event type, usually in the form of enumeration
38
+ * @param param - Event param
39
+ */
40
+ dispatch(type?: number, param?: unknown): void;
41
+ }