@galacean/engine-core 1.0.0 → 1.1.0-alpha.1

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 (147) hide show
  1. package/dist/main.js +16279 -13113
  2. package/dist/main.js.map +1 -1
  3. package/dist/miniprogram.js +16279 -13113
  4. package/dist/module.js +16217 -13061
  5. package/dist/module.js.map +1 -1
  6. package/package.json +3 -3
  7. package/types/2d/assembler/TiledSpriteAssembler.d.ts +1 -0
  8. package/types/2d/atlas/SpriteAtlas.d.ts +2 -6
  9. package/types/2d/data/VertexData2D.d.ts +1 -0
  10. package/types/2d/enums/SpriteDrawMode.d.ts +4 -2
  11. package/types/2d/enums/SpriteTileMode.d.ts +11 -0
  12. package/types/2d/index.d.ts +1 -0
  13. package/types/2d/sprite/Sprite.d.ts +17 -8
  14. package/types/2d/sprite/SpriteMask.d.ts +16 -22
  15. package/types/2d/sprite/SpriteRenderer.d.ts +31 -17
  16. package/types/2d/text/Font.d.ts +2 -7
  17. package/types/2d/text/TextRenderer.d.ts +1 -13
  18. package/types/2d/text/index.d.ts +1 -0
  19. package/types/Camera.d.ts +60 -16
  20. package/types/Component.d.ts +1 -8
  21. package/types/ComponentsDependencies.d.ts +17 -9
  22. package/types/DisorderedArray.d.ts +4 -3
  23. package/types/Engine.d.ts +43 -46
  24. package/types/Entity.d.ts +4 -2
  25. package/types/RenderPipeline/Basic2DBatcher.d.ts +6 -7
  26. package/types/RenderPipeline/BasicRenderPipeline.d.ts +7 -6
  27. package/types/RenderPipeline/ClassPool.d.ts +3 -1
  28. package/types/RenderPipeline/CullingResults.d.ts +1 -0
  29. package/types/RenderPipeline/DepthOnlyPass.d.ts +1 -0
  30. package/types/RenderPipeline/IPoolElement.d.ts +3 -0
  31. package/types/RenderPipeline/MeshRenderData.d.ts +17 -0
  32. package/types/RenderPipeline/MeshRenderElement.d.ts +3 -1
  33. package/types/RenderPipeline/PipelinePass.d.ts +16 -0
  34. package/types/RenderPipeline/PipelineUtils.d.ts +1 -0
  35. package/types/RenderPipeline/RenderData.d.ts +7 -0
  36. package/types/RenderPipeline/RenderElement.d.ts +8 -10
  37. package/types/RenderPipeline/RenderPass.d.ts +1 -1
  38. package/types/RenderPipeline/RenderQueue.d.ts +3 -5
  39. package/types/RenderPipeline/SpriteElement.d.ts +3 -1
  40. package/types/RenderPipeline/SpriteMaskBatcher.d.ts +4 -3
  41. package/types/RenderPipeline/SpriteMaskElement.d.ts +3 -1
  42. package/types/RenderPipeline/SpriteMaskRenderData.d.ts +12 -0
  43. package/types/RenderPipeline/SpriteRenderData.d.ts +14 -0
  44. package/types/RenderPipeline/TextRenderData.d.ts +8 -0
  45. package/types/RenderPipeline/TextRenderElement.d.ts +3 -1
  46. package/types/RenderPipeline/enums/PipelineStage.d.ts +11 -0
  47. package/types/RenderPipeline/index.d.ts +4 -0
  48. package/types/Renderer.d.ts +10 -15
  49. package/types/Scene.d.ts +16 -9
  50. package/types/SceneManager.d.ts +28 -5
  51. package/types/Script.d.ts +18 -15
  52. package/types/Transform.d.ts +9 -12
  53. package/types/Utils.d.ts +28 -0
  54. package/types/animation/AnimationClip.d.ts +2 -1
  55. package/types/animation/Animator.d.ts +5 -4
  56. package/types/animation/animationCurve/AnimationFloatArrayCurve.d.ts +0 -1
  57. package/types/animation/enums/LayerState.d.ts +3 -1
  58. package/types/animation/internal/AnimationCurveLayerOwner.d.ts +1 -0
  59. package/types/asset/AssetType.d.ts +18 -16
  60. package/types/asset/ContentRestorer.d.ts +17 -0
  61. package/types/asset/GraphicsResource.d.ts +5 -0
  62. package/types/asset/IReferable.d.ts +2 -0
  63. package/types/asset/LoadItem.d.ts +16 -9
  64. package/types/asset/Loader.d.ts +3 -1
  65. package/types/asset/ReferResource.d.ts +22 -0
  66. package/types/asset/ResourceManager.d.ts +17 -11
  67. package/types/asset/request.d.ts +7 -3
  68. package/types/base/Constant.d.ts +3 -1
  69. package/types/base/EngineObject.d.ts +1 -0
  70. package/types/base/EventDispatcher.d.ts +2 -15
  71. package/types/base/Time.d.ts +27 -24
  72. package/types/base/index.d.ts +0 -2
  73. package/types/clone/ComponentCloner.d.ts +2 -1
  74. package/types/enums/ActiveChangeFlag.d.ts +6 -0
  75. package/types/enums/DepthTextureMode.d.ts +7 -0
  76. package/types/env-probe/CubeProbe.d.ts +0 -7
  77. package/types/env-probe/Probe.d.ts +0 -6
  78. package/types/graphic/Buffer.d.ts +25 -16
  79. package/types/graphic/BufferUtil.d.ts +1 -0
  80. package/types/graphic/Mesh.d.ts +5 -16
  81. package/types/graphic/SubMesh.d.ts +3 -1
  82. package/types/graphic/VertexElement.d.ts +10 -6
  83. package/types/index.d.ts +9 -7
  84. package/types/input/InputManager.d.ts +3 -3
  85. package/types/input/interface/IInput.d.ts +1 -1
  86. package/types/lighting/AmbientLight.d.ts +4 -1
  87. package/types/lighting/DirectLight.d.ts +0 -1
  88. package/types/lighting/Light.d.ts +0 -1
  89. package/types/lighting/LightManager.d.ts +1 -0
  90. package/types/lighting/SpotLight.d.ts +0 -1
  91. package/types/material/BaseMaterial.d.ts +8 -10
  92. package/types/material/BlinnPhongMaterial.d.ts +0 -3
  93. package/types/material/Material.d.ts +8 -8
  94. package/types/material/PBRMaterial.d.ts +12 -3
  95. package/types/material/PBRSpecularMaterial.d.ts +1 -1
  96. package/types/material/UnlitMaterial.d.ts +1 -1
  97. package/types/mesh/BlendShape.d.ts +1 -1
  98. package/types/mesh/BlendShapeFrame.d.ts +28 -6
  99. package/types/mesh/BufferMesh.d.ts +2 -2
  100. package/types/mesh/MeshRenderer.d.ts +7 -12
  101. package/types/mesh/ModelMesh.d.ts +62 -41
  102. package/types/mesh/PrimitiveMesh.d.ts +6 -2
  103. package/types/mesh/PrimitiveMeshRestorer.d.ts +1 -0
  104. package/types/mesh/Skin.d.ts +3 -0
  105. package/types/mesh/SkinnedMeshRenderer.d.ts +18 -23
  106. package/types/mesh/index.d.ts +6 -5
  107. package/types/particle/ParticleRenderer.d.ts +2 -2
  108. package/types/physics/CharacterController.d.ts +0 -2
  109. package/types/physics/Collider.d.ts +1 -1
  110. package/types/physics/Collision.d.ts +4 -0
  111. package/types/physics/PhysicsManager.d.ts +1 -20
  112. package/types/physics/PhysicsScene.d.ts +75 -0
  113. package/types/physics/index.d.ts +7 -7
  114. package/types/physics/joint/HingeJoint.d.ts +2 -2
  115. package/types/physics/joint/Joint.d.ts +2 -2
  116. package/types/physics/joint/SpringJoint.d.ts +1 -1
  117. package/types/renderingHardwareInterface/IPlatformBuffer.d.ts +7 -0
  118. package/types/renderingHardwareInterface/IPlatformTexture2D.d.ts +1 -1
  119. package/types/renderingHardwareInterface/IPlatformTexture2DArray.d.ts +1 -1
  120. package/types/renderingHardwareInterface/IPlatformTextureCube.d.ts +1 -1
  121. package/types/renderingHardwareInterface/index.d.ts +1 -0
  122. package/types/shader/Shader.d.ts +54 -23
  123. package/types/shader/ShaderData.d.ts +24 -24
  124. package/types/shader/ShaderMacro.d.ts +16 -0
  125. package/types/shader/ShaderPart.d.ts +41 -0
  126. package/types/shader/ShaderPass.d.ts +9 -2
  127. package/types/shader/ShaderProperty.d.ts +7 -0
  128. package/types/shader/ShaderTagKey.d.ts +16 -0
  129. package/types/shader/SubShader.d.ts +19 -0
  130. package/types/shader/enums/RenderStateElementKey.d.ts +58 -0
  131. package/types/shader/index.d.ts +6 -1
  132. package/types/shader/state/index.d.ts +6 -0
  133. package/types/shadow/CascadedShadowCasterPass.d.ts +6 -7
  134. package/types/sky/Sky.d.ts +12 -4
  135. package/types/sky/SkyBoxMaterial.d.ts +27 -9
  136. package/types/sky/SkyProceduralMaterial.d.ts +72 -0
  137. package/types/sky/index.d.ts +1 -0
  138. package/types/texture/RenderTarget.d.ts +3 -8
  139. package/types/texture/Texture.d.ts +8 -6
  140. package/types/texture/Texture2D.d.ts +4 -2
  141. package/types/texture/Texture2DArray.d.ts +1 -1
  142. package/types/texture/TextureCube.d.ts +1 -1
  143. package/types/texture/enums/TextureFormat.d.ts +55 -49
  144. package/types/texture/enums/TextureUsage.d.ts +9 -0
  145. package/types/texture/index.d.ts +1 -0
  146. package/types/trail/TrailRenderer.d.ts +0 -5
  147. package/types/utils/SafeLoopArray.d.ts +41 -0
@@ -0,0 +1,72 @@
1
+ import { Color } from "@galacean/engine-math";
2
+ import { Engine } from "../Engine";
3
+ import { Material } from "../material/Material";
4
+ /**
5
+ * Sun mode.
6
+ */
7
+ export declare enum SunMode {
8
+ /** None */
9
+ None = 0,
10
+ /** Simple sun. */
11
+ Simple = 1,
12
+ /** High quality sun. */
13
+ HighQuality = 2
14
+ }
15
+ /**
16
+ * Sky procedural material.
17
+ */
18
+ export declare class SkyProceduralMaterial extends Material {
19
+ private static _sunSizeProp;
20
+ private static _sunSizeConvergenceProp;
21
+ private static _atmosphereThicknessProp;
22
+ private static _skyTintProp;
23
+ private static _groundTintProp;
24
+ private static _exposureProp;
25
+ private static _sunHighQualityMacro;
26
+ private static _sunSimpleMacro;
27
+ private _sunDisk;
28
+ /**
29
+ * Sun mode.
30
+ */
31
+ get sunMode(): SunMode;
32
+ set sunMode(value: SunMode);
33
+ /**
34
+ * Sun size, range is 0 to 1.
35
+ */
36
+ get sunSize(): number;
37
+ set sunSize(value: number);
38
+ /**
39
+ * Sun size convergence, range is 0 to 20.
40
+ */
41
+ get sunSizeConvergence(): number;
42
+ set sunSizeConvergence(value: number);
43
+ /**
44
+ * Atmosphere thickness, range is 0 to 5.
45
+ */
46
+ get atmosphereThickness(): number;
47
+ set atmosphereThickness(value: number);
48
+ /**
49
+ * Sky tint.
50
+ */
51
+ get skyTint(): Color;
52
+ set skyTint(value: Color);
53
+ /**
54
+ * Ground tint.
55
+ */
56
+ get groundTint(): Color;
57
+ set groundTint(value: Color);
58
+ /**
59
+ * Exposure, range is 0 to 8.
60
+ */
61
+ get exposure(): number;
62
+ set exposure(value: number);
63
+ /**
64
+ * Constructor a SkyBoxProceduralMaterial instance.
65
+ * @param engine - Engine to which the material belongs
66
+ */
67
+ constructor(engine: Engine);
68
+ /**
69
+ * @inheritDoc
70
+ */
71
+ clone(): SkyProceduralMaterial;
72
+ }
@@ -1,2 +1,3 @@
1
1
  export { Sky } from "./Sky";
2
2
  export { SkyBoxMaterial } from "./SkyBoxMaterial";
3
+ export { SkyProceduralMaterial, SunMode } from "./SkyProceduralMaterial";
@@ -1,11 +1,11 @@
1
- import { EngineObject } from "../base";
1
+ import { GraphicsResource } from "../asset/GraphicsResource";
2
2
  import { Engine } from "../Engine";
3
3
  import { RenderBufferDepthFormat } from "./enums/RenderBufferDepthFormat";
4
4
  import { Texture } from "./Texture";
5
5
  /**
6
6
  * The render target used for off-screen rendering.
7
7
  */
8
- export declare class RenderTarget extends EngineObject {
8
+ export declare class RenderTarget extends GraphicsResource {
9
9
  private _autoGenerateMipmaps;
10
10
  private _width;
11
11
  private _height;
@@ -79,17 +79,12 @@ export declare class RenderTarget extends EngineObject {
79
79
  */
80
80
  constructor(engine: Engine, width: number, height: number, colorTextures: Texture[], depthTexture: Texture, antiAliasing?: number);
81
81
  /**
82
- *
83
82
  * Get the render color texture by index.
84
- * @param index
83
+ * @param index - Render color texture index
85
84
  */
86
85
  getColorTexture(index?: number): Texture | null;
87
86
  /**
88
87
  * Generate the mipmap of each attachment texture of the renderTarget according to the configuration.
89
88
  */
90
89
  generateMipmaps(): void;
91
- /**
92
- * Destroy render target.
93
- */
94
- destroy(): void;
95
90
  }
@@ -1,16 +1,18 @@
1
- import { RefObject } from "../asset/RefObject";
1
+ import { GraphicsResource } from "../asset/GraphicsResource";
2
2
  import { TextureDepthCompareFunction } from "./enums/TextureDepthCompareFunction";
3
3
  import { TextureFilterMode } from "./enums/TextureFilterMode";
4
4
  import { TextureFormat } from "./enums/TextureFormat";
5
+ import { TextureUsage } from "./enums/TextureUsage";
5
6
  import { TextureWrapMode } from "./enums/TextureWrapMode";
6
7
  /**
7
8
  * The base class of texture, contains some common functions of texture-related classes.
8
9
  */
9
- export declare abstract class Texture extends RefObject {
10
+ export declare abstract class Texture extends GraphicsResource {
10
11
  name: string;
11
12
  protected _format: TextureFormat;
12
13
  protected _width: number;
13
14
  protected _height: number;
15
+ protected _usage: TextureUsage;
14
16
  protected _mipmapCount: number;
15
17
  private _wrapModeU;
16
18
  private _wrapModeV;
@@ -30,6 +32,10 @@ export declare abstract class Texture extends RefObject {
30
32
  * The height of the texture.
31
33
  */
32
34
  get height(): number;
35
+ /**
36
+ * The usage of the texture.
37
+ */
38
+ get usage(): TextureUsage;
33
39
  /**
34
40
  * Wrapping mode for texture coordinate S.
35
41
  */
@@ -64,10 +70,6 @@ export declare abstract class Texture extends RefObject {
64
70
  * Generate multi-level textures based on the 0th level data.
65
71
  */
66
72
  generateMipmaps(): void;
67
- /**
68
- * @override
69
- */
70
- _onDestroy(): void;
71
73
  /**
72
74
  * Get the maximum mip level of the corresponding size:rounding down.
73
75
  * @remarks http://download.nvidia.com/developer/Papers/2005/NP2_Mipmapping/NP2_Mipmap_Creation.pdf
@@ -1,5 +1,6 @@
1
1
  import { Engine } from "../Engine";
2
2
  import { TextureFormat } from "./enums/TextureFormat";
3
+ import { TextureUsage } from "./enums/TextureUsage";
3
4
  import { Texture } from "./Texture";
4
5
  /**
5
6
  * Two-dimensional texture.
@@ -12,8 +13,9 @@ export declare class Texture2D extends Texture {
12
13
  * @param height - Texture height
13
14
  * @param format - Texture format. default `TextureFormat.R8G8B8A8`
14
15
  * @param mipmap - Whether to use multi-level texture
16
+ * @param usage - Texture usage
15
17
  */
16
- constructor(engine: Engine, width: number, height: number, format?: TextureFormat, mipmap?: boolean);
18
+ constructor(engine: Engine, width: number, height: number, format?: TextureFormat, mipmap?: boolean, usage?: TextureUsage);
17
19
  /**
18
20
  * Setting pixels data through color buffer data, designated area and texture mipmapping level,it's also applicable to compressed formats.
19
21
  * @remarks If it is the WebGL1.0 platform and the texture format is compressed, the first upload must be filled with textures.
@@ -34,7 +36,7 @@ export declare class Texture2D extends Texture {
34
36
  * @param x - X coordinate of area start
35
37
  * @param y - Y coordinate of area start
36
38
  */
37
- setImageSource(imageSource: TexImageSource | OffscreenCanvas, mipLevel?: number, flipY?: boolean, premultiplyAlpha?: boolean, x?: number, y?: number): void;
39
+ setImageSource(imageSource: TexImageSource, mipLevel?: number, flipY?: boolean, premultiplyAlpha?: boolean, x?: number, y?: number): void;
38
40
  /**
39
41
  * Get pixel color buffer.
40
42
  * @param out - Color buffer
@@ -43,7 +43,7 @@ export declare class Texture2DArray extends Texture {
43
43
  * @param x - X coordinate of area start
44
44
  * @param y - Y coordinate of area start
45
45
  */
46
- setImageSource(elementIndex: number, imageSource: TexImageSource | OffscreenCanvas, mipLevel?: number, flipY?: boolean, premultiplyAlpha?: boolean, x?: number, y?: number): void;
46
+ setImageSource(elementIndex: number, imageSource: TexImageSource, mipLevel?: number, flipY?: boolean, premultiplyAlpha?: boolean, x?: number, y?: number): void;
47
47
  /**
48
48
  * Get pixel color buffer.
49
49
  * @param elementIndex - The texture array element index
@@ -36,7 +36,7 @@ export declare class TextureCube extends Texture {
36
36
  * @param x - X coordinate of area start
37
37
  * @param y - Y coordinate of area start
38
38
  */
39
- setImageSource(face: TextureCubeFace, imageSource: TexImageSource | OffscreenCanvas, mipLevel?: number, flipY?: boolean, premultiplyAlpha?: boolean, x?: number, y?: number): void;
39
+ setImageSource(face: TextureCubeFace, imageSource: TexImageSource, mipLevel?: number, flipY?: boolean, premultiplyAlpha?: boolean, x?: number, y?: number): void;
40
40
  /**
41
41
  * Get pixel color buffer.
42
42
  * @param out - Color buffer
@@ -2,68 +2,74 @@
2
2
  * Texture format enumeration.
3
3
  */
4
4
  export declare enum TextureFormat {
5
- /** RGB format,8 bits per channel. */
5
+ /** RGB format, 8 bits per channel. */
6
6
  R8G8B8 = 0,
7
- /** RGBA format,8 bits per channel. */
7
+ /** RGBA format, 8 bits per channel. */
8
8
  R8G8B8A8 = 1,
9
- /** RGBA format,4 bits per channel. */
9
+ /** RGBA format, 4 bits per channel. */
10
10
  R4G4B4A4 = 2,
11
- /** RGBA format,5 bits in R channel,5 bits in G channel,5 bits in B channel, 1 bit in A channel. */
11
+ /** RGBA format, 5 bits in R channel, 5 bits in G channel, 5 bits in B channel, 1 bit in A channel. */
12
12
  R5G5B5A1 = 3,
13
- /** RGB format,5 bits in R channel,6 bits in G channel,5 bits in B channel. */
13
+ /** RGB format, 5 bits in R channel, 6 bits in G channel, 5 bits in B channel. */
14
14
  R5G6B5 = 4,
15
- /** Transparent format,8 bits. */
15
+ /** Transparent format, 8 bits. */
16
16
  Alpha8 = 5,
17
17
  /** Luminance/alpha in RGB channel, alpha in A channel. */
18
18
  LuminanceAlpha = 6,
19
- /** RGBA format,16 bits per channel. */
19
+ /** RGBA format, 16 bits per channel. */
20
20
  R16G16B16A16 = 7,
21
- /** RGBA format,32 bits per channel. */
21
+ /** RGBA format, 32 bits per channel. */
22
22
  R32G32B32A32 = 8,
23
- /** RGB compressed format。*/
24
- DXT1 = 9,
25
- /** RGBA compressed format。*/
26
- DXT5 = 10,
27
- /** RGB compressed format,4 bits per pixel。*/
28
- ETC1_RGB = 11,
29
- /** RGB compressed format,4 bits per pixel。*/
30
- ETC2_RGB = 12,
31
- /** RGBA compressed format,5 bits per pixel,4 bit in RGB, 1 bit in A. */
32
- ETC2_RGBA5 = 13,
33
- /** RGB compressed format,8 bits per pixel. */
34
- ETC2_RGBA8 = 14,
35
- /** RGB compressed format,2 bits per pixel. */
36
- PVRTC_RGB2 = 15,
37
- /** RGBA compressed format,2 bits per pixel. */
38
- PVRTC_RGBA2 = 16,
39
- /** RGB compressed format,4 bits per pixel. */
40
- PVRTC_RGB4 = 17,
41
- /** RGBA compressed format,4 bits per pixel. */
42
- PVRTC_RGBA4 = 18,
43
- /** RGB(A) compressed format,128 bits per 4x4 pixel block. */
44
- ASTC_4x4 = 19,
45
- /** RGB(A) compressed format,128 bits per 5x5 pixel block. */
46
- ASTC_5x5 = 20,
47
- /** RGB(A) compressed format,128 bits per 6x6 pixel block. */
48
- ASTC_6x6 = 21,
49
- /** RGB(A) compressed format,128 bits per 8x8 pixel block. */
50
- ASTC_8x8 = 22,
51
- /** RGB(A) compressed format,128 bits per 10x10 pixel block. */
52
- ASTC_10x10 = 23,
53
- /** RGB(A) compressed format,128 bits per 12x12 pixel block. */
54
- ASTC_12x12 = 24,
55
- /** Automatic depth format,engine will automatically select the supported precision. */
56
- Depth = 25,
57
- /** Automatic depth setncil format, engine will automatically select the supported precision. */
58
- DepthStencil = 26,
23
+ /** RGB compressed format, 4 bits per pixel. */
24
+ BC1 = 9,
25
+ /** RGBA compressed format, 8 bits per pixel. */
26
+ BC3 = 10,
27
+ /** RGB(A) compressed format, 128 bits per 4x4 pixel block. */
28
+ BC7 = 11,
29
+ /** RGB compressed format, 4 bits per pixel. */
30
+ ETC1_RGB = 12,
31
+ /** RGB compressed format, 4 bits per pixel. */
32
+ ETC2_RGB = 13,
33
+ /** RGBA compressed format, 5 bits per pixel, 4 bit in RGB, 1 bit in A. */
34
+ ETC2_RGBA5 = 14,
35
+ /** RGB compressed format, 8 bits per pixel. */
36
+ ETC2_RGBA8 = 15,
37
+ /** RGB compressed format, 2 bits per pixel. */
38
+ PVRTC_RGB2 = 16,
39
+ /** RGBA compressed format, 2 bits per pixel. */
40
+ PVRTC_RGBA2 = 17,
41
+ /** RGB compressed format, 4 bits per pixel. */
42
+ PVRTC_RGB4 = 18,
43
+ /** RGBA compressed format, 4 bits per pixel. */
44
+ PVRTC_RGBA4 = 19,
45
+ /** RGB(A) compressed format, 128 bits per 4x4 pixel block. */
46
+ ASTC_4x4 = 20,
47
+ /** RGB(A) compressed format, 128 bits per 5x5 pixel block. */
48
+ ASTC_5x5 = 21,
49
+ /** RGB(A) compressed format, 128 bits per 6x6 pixel block. */
50
+ ASTC_6x6 = 22,
51
+ /** RGB(A) compressed format, 128 bits per 8x8 pixel block. */
52
+ ASTC_8x8 = 23,
53
+ /** RGB(A) compressed format, 128 bits per 10x10 pixel block. */
54
+ ASTC_10x10 = 24,
55
+ /** RGB(A) compressed format, 128 bits per 12x12 pixel block. */
56
+ ASTC_12x12 = 25,
57
+ /** Automatic depth format, engine will automatically select the supported precision. */
58
+ Depth = 26,
59
+ /** Automatic depth stencil format, engine will automatically select the supported precision. */
60
+ DepthStencil = 27,
59
61
  /** 16-bit depth format. */
60
- Depth16 = 27,
62
+ Depth16 = 28,
61
63
  /** 24-bit depth format. */
62
- Depth24 = 28,
64
+ Depth24 = 29,
63
65
  /** 32-bit depth format. */
64
- Depth32 = 29,
66
+ Depth32 = 30,
65
67
  /** 16-bit depth + 8-bit stencil format. */
66
- Depth24Stencil8 = 30,
68
+ Depth24Stencil8 = 31,
67
69
  /** 32-bit depth + 8-bit stencil format. */
68
- Depth32Stencil8 = 31
70
+ Depth32Stencil8 = 32,
71
+ /** @deprecated Use `TextureFormat.BC1` instead. */
72
+ DXT1 = 33,
73
+ /** @deprecated Use `TextureFormat.BC3` instead. */
74
+ DXT5 = 34
69
75
  }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Texture usage.
3
+ */
4
+ export declare enum TextureUsage {
5
+ /** The content of the texture is intended to be specified once. */
6
+ Static = 0,
7
+ /** The content of the texture is intended to be updated frequently, with better performance. */
8
+ Dynamic = 1
9
+ }
@@ -3,6 +3,7 @@ export { TextureCubeFace } from "./enums/TextureCubeFace";
3
3
  export { TextureDepthCompareFunction } from "./enums/TextureDepthCompareFunction";
4
4
  export { TextureFilterMode } from "./enums/TextureFilterMode";
5
5
  export { TextureFormat } from "./enums/TextureFormat";
6
+ export { TextureUsage } from "./enums/TextureUsage";
6
7
  export { TextureWrapMode } from "./enums/TextureWrapMode";
7
8
  export { RenderTarget } from "./RenderTarget";
8
9
  export { Texture } from "./Texture";
@@ -1,6 +1,5 @@
1
1
  import { Entity } from "../Entity";
2
2
  import { MeshRenderer } from "../mesh/MeshRenderer";
3
- import { RenderContext } from "../RenderPipeline/RenderContext";
4
3
  import { Texture2D } from "../texture";
5
4
  /**
6
5
  * @deprecated
@@ -28,10 +27,6 @@ export declare class TrailRenderer extends MeshRenderer {
28
27
  * @param texture
29
28
  */
30
29
  setTexture(texture: Texture2D): void;
31
- /**
32
- * @override
33
- */
34
- protected _render(context: RenderContext): void;
35
30
  private _initGeometry;
36
31
  private _updateStrapVertices;
37
32
  private _updateStrapCoords;
@@ -0,0 +1,41 @@
1
+ export declare class SafeLoopArray<T> {
2
+ private _array;
3
+ private _loopArray;
4
+ private _loopArrayDirty;
5
+ /**
6
+ * Get the length of the array.
7
+ */
8
+ get length(): number;
9
+ /**
10
+ * Push item to the array.
11
+ * @param item - The item which want to be pushed
12
+ */
13
+ push(item: T): void;
14
+ /**
15
+ * Add item to the array.
16
+ * @param index - The index of the array
17
+ * @param item - The item which want to be added
18
+ */
19
+ add(index: number, item: T): void;
20
+ /**
21
+ * Remove item from the array.
22
+ * @param index - The index of the array
23
+ */
24
+ removeByIndex(index: number): void;
25
+ /**
26
+ * The index of the item.
27
+ * @param item - The item which want to get the index
28
+ * @returns Index of the item
29
+ */
30
+ indexOf(item: T): number;
31
+ /**
32
+ * Get the array.
33
+ * @returns The array
34
+ */
35
+ getArray(): ReadonlyArray<T>;
36
+ /**
37
+ * Get the array use for loop.
38
+ * @returns The array use for loop
39
+ */
40
+ getLoopArray(): ReadonlyArray<T>;
41
+ }