@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.
- package/dist/main.js +16279 -13113
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +16279 -13113
- package/dist/module.js +16217 -13061
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
- package/types/2d/assembler/TiledSpriteAssembler.d.ts +1 -0
- package/types/2d/atlas/SpriteAtlas.d.ts +2 -6
- package/types/2d/data/VertexData2D.d.ts +1 -0
- package/types/2d/enums/SpriteDrawMode.d.ts +4 -2
- package/types/2d/enums/SpriteTileMode.d.ts +11 -0
- package/types/2d/index.d.ts +1 -0
- package/types/2d/sprite/Sprite.d.ts +17 -8
- package/types/2d/sprite/SpriteMask.d.ts +16 -22
- package/types/2d/sprite/SpriteRenderer.d.ts +31 -17
- package/types/2d/text/Font.d.ts +2 -7
- package/types/2d/text/TextRenderer.d.ts +1 -13
- package/types/2d/text/index.d.ts +1 -0
- package/types/Camera.d.ts +60 -16
- package/types/Component.d.ts +1 -8
- package/types/ComponentsDependencies.d.ts +17 -9
- package/types/DisorderedArray.d.ts +4 -3
- package/types/Engine.d.ts +43 -46
- package/types/Entity.d.ts +4 -2
- package/types/RenderPipeline/Basic2DBatcher.d.ts +6 -7
- package/types/RenderPipeline/BasicRenderPipeline.d.ts +7 -6
- package/types/RenderPipeline/ClassPool.d.ts +3 -1
- package/types/RenderPipeline/CullingResults.d.ts +1 -0
- package/types/RenderPipeline/DepthOnlyPass.d.ts +1 -0
- package/types/RenderPipeline/IPoolElement.d.ts +3 -0
- package/types/RenderPipeline/MeshRenderData.d.ts +17 -0
- package/types/RenderPipeline/MeshRenderElement.d.ts +3 -1
- package/types/RenderPipeline/PipelinePass.d.ts +16 -0
- package/types/RenderPipeline/PipelineUtils.d.ts +1 -0
- package/types/RenderPipeline/RenderData.d.ts +7 -0
- package/types/RenderPipeline/RenderElement.d.ts +8 -10
- package/types/RenderPipeline/RenderPass.d.ts +1 -1
- package/types/RenderPipeline/RenderQueue.d.ts +3 -5
- package/types/RenderPipeline/SpriteElement.d.ts +3 -1
- package/types/RenderPipeline/SpriteMaskBatcher.d.ts +4 -3
- package/types/RenderPipeline/SpriteMaskElement.d.ts +3 -1
- package/types/RenderPipeline/SpriteMaskRenderData.d.ts +12 -0
- package/types/RenderPipeline/SpriteRenderData.d.ts +14 -0
- package/types/RenderPipeline/TextRenderData.d.ts +8 -0
- package/types/RenderPipeline/TextRenderElement.d.ts +3 -1
- package/types/RenderPipeline/enums/PipelineStage.d.ts +11 -0
- package/types/RenderPipeline/index.d.ts +4 -0
- package/types/Renderer.d.ts +10 -15
- package/types/Scene.d.ts +16 -9
- package/types/SceneManager.d.ts +28 -5
- package/types/Script.d.ts +18 -15
- package/types/Transform.d.ts +9 -12
- package/types/Utils.d.ts +28 -0
- package/types/animation/AnimationClip.d.ts +2 -1
- package/types/animation/Animator.d.ts +5 -4
- package/types/animation/animationCurve/AnimationFloatArrayCurve.d.ts +0 -1
- package/types/animation/enums/LayerState.d.ts +3 -1
- package/types/animation/internal/AnimationCurveLayerOwner.d.ts +1 -0
- package/types/asset/AssetType.d.ts +18 -16
- package/types/asset/ContentRestorer.d.ts +17 -0
- package/types/asset/GraphicsResource.d.ts +5 -0
- package/types/asset/IReferable.d.ts +2 -0
- package/types/asset/LoadItem.d.ts +16 -9
- package/types/asset/Loader.d.ts +3 -1
- package/types/asset/ReferResource.d.ts +22 -0
- package/types/asset/ResourceManager.d.ts +17 -11
- package/types/asset/request.d.ts +7 -3
- package/types/base/Constant.d.ts +3 -1
- package/types/base/EngineObject.d.ts +1 -0
- package/types/base/EventDispatcher.d.ts +2 -15
- package/types/base/Time.d.ts +27 -24
- package/types/base/index.d.ts +0 -2
- package/types/clone/ComponentCloner.d.ts +2 -1
- package/types/enums/ActiveChangeFlag.d.ts +6 -0
- package/types/enums/DepthTextureMode.d.ts +7 -0
- package/types/env-probe/CubeProbe.d.ts +0 -7
- package/types/env-probe/Probe.d.ts +0 -6
- package/types/graphic/Buffer.d.ts +25 -16
- package/types/graphic/BufferUtil.d.ts +1 -0
- package/types/graphic/Mesh.d.ts +5 -16
- package/types/graphic/SubMesh.d.ts +3 -1
- package/types/graphic/VertexElement.d.ts +10 -6
- package/types/index.d.ts +9 -7
- package/types/input/InputManager.d.ts +3 -3
- package/types/input/interface/IInput.d.ts +1 -1
- package/types/lighting/AmbientLight.d.ts +4 -1
- package/types/lighting/DirectLight.d.ts +0 -1
- package/types/lighting/Light.d.ts +0 -1
- package/types/lighting/LightManager.d.ts +1 -0
- package/types/lighting/SpotLight.d.ts +0 -1
- package/types/material/BaseMaterial.d.ts +8 -10
- package/types/material/BlinnPhongMaterial.d.ts +0 -3
- package/types/material/Material.d.ts +8 -8
- package/types/material/PBRMaterial.d.ts +12 -3
- package/types/material/PBRSpecularMaterial.d.ts +1 -1
- package/types/material/UnlitMaterial.d.ts +1 -1
- package/types/mesh/BlendShape.d.ts +1 -1
- package/types/mesh/BlendShapeFrame.d.ts +28 -6
- package/types/mesh/BufferMesh.d.ts +2 -2
- package/types/mesh/MeshRenderer.d.ts +7 -12
- package/types/mesh/ModelMesh.d.ts +62 -41
- package/types/mesh/PrimitiveMesh.d.ts +6 -2
- package/types/mesh/PrimitiveMeshRestorer.d.ts +1 -0
- package/types/mesh/Skin.d.ts +3 -0
- package/types/mesh/SkinnedMeshRenderer.d.ts +18 -23
- package/types/mesh/index.d.ts +6 -5
- package/types/particle/ParticleRenderer.d.ts +2 -2
- package/types/physics/CharacterController.d.ts +0 -2
- package/types/physics/Collider.d.ts +1 -1
- package/types/physics/Collision.d.ts +4 -0
- package/types/physics/PhysicsManager.d.ts +1 -20
- package/types/physics/PhysicsScene.d.ts +75 -0
- package/types/physics/index.d.ts +7 -7
- package/types/physics/joint/HingeJoint.d.ts +2 -2
- package/types/physics/joint/Joint.d.ts +2 -2
- package/types/physics/joint/SpringJoint.d.ts +1 -1
- package/types/renderingHardwareInterface/IPlatformBuffer.d.ts +7 -0
- package/types/renderingHardwareInterface/IPlatformTexture2D.d.ts +1 -1
- package/types/renderingHardwareInterface/IPlatformTexture2DArray.d.ts +1 -1
- package/types/renderingHardwareInterface/IPlatformTextureCube.d.ts +1 -1
- package/types/renderingHardwareInterface/index.d.ts +1 -0
- package/types/shader/Shader.d.ts +54 -23
- package/types/shader/ShaderData.d.ts +24 -24
- package/types/shader/ShaderMacro.d.ts +16 -0
- package/types/shader/ShaderPart.d.ts +41 -0
- package/types/shader/ShaderPass.d.ts +9 -2
- package/types/shader/ShaderProperty.d.ts +7 -0
- package/types/shader/ShaderTagKey.d.ts +16 -0
- package/types/shader/SubShader.d.ts +19 -0
- package/types/shader/enums/RenderStateElementKey.d.ts +58 -0
- package/types/shader/index.d.ts +6 -1
- package/types/shader/state/index.d.ts +6 -0
- package/types/shadow/CascadedShadowCasterPass.d.ts +6 -7
- package/types/sky/Sky.d.ts +12 -4
- package/types/sky/SkyBoxMaterial.d.ts +27 -9
- package/types/sky/SkyProceduralMaterial.d.ts +72 -0
- package/types/sky/index.d.ts +1 -0
- package/types/texture/RenderTarget.d.ts +3 -8
- package/types/texture/Texture.d.ts +8 -6
- package/types/texture/Texture2D.d.ts +4 -2
- package/types/texture/Texture2DArray.d.ts +1 -1
- package/types/texture/TextureCube.d.ts +1 -1
- package/types/texture/enums/TextureFormat.d.ts +55 -49
- package/types/texture/enums/TextureUsage.d.ts +9 -0
- package/types/texture/index.d.ts +1 -0
- package/types/trail/TrailRenderer.d.ts +0 -5
- 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
|
+
}
|
package/types/sky/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
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
|
|
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 {
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
25
|
-
/** RGBA compressed format
|
|
26
|
-
|
|
27
|
-
/** RGB compressed format,
|
|
28
|
-
|
|
29
|
-
/** RGB compressed format,4 bits per pixel
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
|
|
35
|
-
/** RGB compressed format,
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
|
|
45
|
-
/** RGB(A) compressed format,128 bits per
|
|
46
|
-
|
|
47
|
-
/** RGB(A) compressed format,128 bits per
|
|
48
|
-
|
|
49
|
-
/** RGB(A) compressed format,128 bits per
|
|
50
|
-
|
|
51
|
-
/** RGB(A) compressed format,128 bits per
|
|
52
|
-
|
|
53
|
-
/** RGB(A) compressed format,128 bits per
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
|
|
57
|
-
/** Automatic depth
|
|
58
|
-
|
|
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 =
|
|
62
|
+
Depth16 = 28,
|
|
61
63
|
/** 24-bit depth format. */
|
|
62
|
-
Depth24 =
|
|
64
|
+
Depth24 = 29,
|
|
63
65
|
/** 32-bit depth format. */
|
|
64
|
-
Depth32 =
|
|
66
|
+
Depth32 = 30,
|
|
65
67
|
/** 16-bit depth + 8-bit stencil format. */
|
|
66
|
-
Depth24Stencil8 =
|
|
68
|
+
Depth24Stencil8 = 31,
|
|
67
69
|
/** 32-bit depth + 8-bit stencil format. */
|
|
68
|
-
Depth32Stencil8 =
|
|
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
|
+
}
|
package/types/texture/index.d.ts
CHANGED
|
@@ -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
|
+
}
|