@galacean/engine-core 2.0.0-alpha.60 → 2.0.0-alpha.61
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 +83 -70
- package/dist/main.js.map +1 -1
- package/dist/module.js +83 -70
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
- package/types/base/Constant.d.ts +1 -0
- package/types/texture/Texture.d.ts +3 -1
- package/types/texture/Texture2D.d.ts +1 -1
- package/types/texture/Texture2DArray.d.ts +1 -1
- package/types/texture/TextureCube.d.ts +1 -1
- package/types/texture/enums/TextureFormat.d.ts +57 -47
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/engine-core",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.61",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"types/**/*"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@galacean/engine-design": "2.0.0-alpha.
|
|
22
|
-
"@galacean/engine-math": "2.0.0-alpha.
|
|
21
|
+
"@galacean/engine-design": "2.0.0-alpha.61",
|
|
22
|
+
"@galacean/engine-math": "2.0.0-alpha.61"
|
|
23
23
|
},
|
|
24
24
|
"scripts": {
|
|
25
25
|
"b:types": "tsc"
|
package/types/base/Constant.d.ts
CHANGED
|
@@ -77,6 +77,7 @@ export declare enum DataType {
|
|
|
77
77
|
* Optional GL capabilities.
|
|
78
78
|
* */
|
|
79
79
|
export declare enum GLCapabilityType {
|
|
80
|
+
textureNorm16 = "EXT_texture_norm16",
|
|
80
81
|
textureFloatLinear = "OES_texture_float_linear",
|
|
81
82
|
colorBufferFloat = "EXT_color_buffer_float",
|
|
82
83
|
colorBufferHalfFloat = "EXT_color_buffer_half_float",
|
|
@@ -67,7 +67,9 @@ export declare abstract class Texture extends GraphicsResource {
|
|
|
67
67
|
get mipmapCount(): number;
|
|
68
68
|
/**
|
|
69
69
|
* Sampling filter mode.
|
|
70
|
-
* @remarks
|
|
70
|
+
* @remarks
|
|
71
|
+
* Integer formats (`TextureFormat.R32G32B32A32_UInt`) only accept `TextureFilterMode.Point`; other modes log a warning and are ignored.
|
|
72
|
+
* For 32-bit float formats, linear modes are kept on this property and fall back to `TextureFilterMode.Point` when sampling if the device does not support linear float filtering.
|
|
71
73
|
*/
|
|
72
74
|
get filterMode(): TextureFilterMode;
|
|
73
75
|
set filterMode(value: TextureFilterMode);
|
|
@@ -11,7 +11,7 @@ export declare class Texture2D extends Texture {
|
|
|
11
11
|
* @param engine - Define the engine to use to render this texture
|
|
12
12
|
* @param width - Texture width
|
|
13
13
|
* @param height - Texture height
|
|
14
|
-
* @param format - Texture format. default `TextureFormat.
|
|
14
|
+
* @param format - Texture format. default `TextureFormat.R8G8B8A8_UNorm`
|
|
15
15
|
* @param mipmap - Whether to use multi-level texture
|
|
16
16
|
* @param isSRGBColorSpace - Whether the texture data is in sRGB color space, otherwise is linear color space. @defaultValue `true`
|
|
17
17
|
* @param usage - Texture usage
|
|
@@ -16,7 +16,7 @@ export declare class Texture2DArray extends Texture {
|
|
|
16
16
|
* @param width - Texture width
|
|
17
17
|
* @param height - Texture height
|
|
18
18
|
* @param length - Texture length
|
|
19
|
-
* @param format - Texture format. default `TextureFormat.
|
|
19
|
+
* @param format - Texture format. default `TextureFormat.R8G8B8A8_UNorm`
|
|
20
20
|
* @param mipmap - Whether to use multi-level texture
|
|
21
21
|
* @param isSRGBColorSpace - Whether the texture data is in sRGB color space, otherwise is linear color space. @defaultValue `true`
|
|
22
22
|
*/
|
|
@@ -10,7 +10,7 @@ export declare class TextureCube extends Texture {
|
|
|
10
10
|
* Create TextureCube.
|
|
11
11
|
* @param engine - Define the engine to use to render this texture
|
|
12
12
|
* @param size - Texture size. texture width must be equal to height in cube texture
|
|
13
|
-
* @param format - Texture format,default TextureFormat.
|
|
13
|
+
* @param format - Texture format,default TextureFormat.R8G8B8A8_UNorm
|
|
14
14
|
* @param mipmap - Whether to use multi-level texture
|
|
15
15
|
* @param isSRGBColorSpace - Whether the texture data is in sRGB color space, otherwise is linear color space. @defaultValue `true`
|
|
16
16
|
*/
|
|
@@ -1,79 +1,89 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Pixel storage format for textures and render targets.
|
|
3
3
|
*/
|
|
4
4
|
export declare enum TextureFormat {
|
|
5
|
-
/** RGB
|
|
6
|
-
|
|
7
|
-
/** RGBA
|
|
8
|
-
|
|
9
|
-
/** RGBA
|
|
10
|
-
|
|
11
|
-
/** RGBA
|
|
12
|
-
|
|
13
|
-
/** RGB
|
|
14
|
-
|
|
15
|
-
/** RGBA
|
|
16
|
-
|
|
17
|
-
/** RGBA
|
|
18
|
-
|
|
19
|
-
/** RGBA unsigned integer format
|
|
5
|
+
/** RGB 8-bit unsigned normalized format. `getPixelBuffer` outputs RGBA `Uint8Array`. */
|
|
6
|
+
R8G8B8_UNorm = 0,
|
|
7
|
+
/** RGBA 8-bit unsigned normalized format. */
|
|
8
|
+
R8G8B8A8_UNorm = 1,
|
|
9
|
+
/** Packed RGBA 4-4-4-4 unsigned normalized format. */
|
|
10
|
+
R4G4B4A4_UNorm = 2,
|
|
11
|
+
/** Packed RGBA 5-5-5-1 unsigned normalized format. */
|
|
12
|
+
R5G5B5A1_UNorm = 3,
|
|
13
|
+
/** Packed RGB 5-6-5 unsigned normalized format. */
|
|
14
|
+
R5G6B5_UNorm = 4,
|
|
15
|
+
/** RGBA 16-bit signed float format (half-float `Uint16Array`). `getPixelBuffer` outputs RGBA `Float32Array`. */
|
|
16
|
+
R16G16B16A16_SFloat = 7,
|
|
17
|
+
/** RGBA 32-bit signed float format (`Float32Array`). */
|
|
18
|
+
R32G32B32A32_SFloat = 8,
|
|
19
|
+
/** RGBA 32-bit unsigned integer format (`Uint32Array`, `TextureFilterMode.Point` only). */
|
|
20
20
|
R32G32B32A32_UInt = 9,
|
|
21
|
-
/** RGB unsigned float format
|
|
21
|
+
/** Packed RGB 11-11-10 unsigned float format (`Float32Array`). `getPixelBuffer` outputs RGBA `Float32Array`. */
|
|
22
22
|
R11G11B10_UFloat = 35,
|
|
23
|
-
/** R
|
|
24
|
-
|
|
25
|
-
/** RG
|
|
26
|
-
|
|
27
|
-
/**
|
|
23
|
+
/** R 8-bit unsigned normalized format. */
|
|
24
|
+
R8_UNorm = 36,
|
|
25
|
+
/** RG 8-bit unsigned normalized format. */
|
|
26
|
+
R8G8_UNorm = 37,
|
|
27
|
+
/** R 16-bit unsigned normalized format (`Uint16Array`). `getPixelBuffer` outputs RGBA `Uint16Array`. */
|
|
28
|
+
R16_UNorm = 38,
|
|
29
|
+
/** R 16-bit signed float format (half-float `Uint16Array`). `getPixelBuffer` outputs RGBA `Float32Array`. */
|
|
30
|
+
R16_SFloat = 39,
|
|
31
|
+
/** RG 16-bit signed float format (half-float `Uint16Array`). `getPixelBuffer` outputs RGBA `Float32Array`. */
|
|
32
|
+
R16G16_SFloat = 40,
|
|
33
|
+
/** R 32-bit signed float format (`Float32Array`). `getPixelBuffer` outputs RGBA `Float32Array`. */
|
|
34
|
+
R32_SFloat = 41,
|
|
35
|
+
/** RG 32-bit signed float format (`Float32Array`). `getPixelBuffer` outputs RGBA `Float32Array`. */
|
|
36
|
+
R32G32_SFloat = 42,
|
|
37
|
+
/** RGB S3TC/DXT1 compressed format, 4 bits per pixel. */
|
|
28
38
|
BC1 = 10,
|
|
29
|
-
/** RGBA compressed format, 8 bits per pixel. */
|
|
39
|
+
/** RGBA S3TC/DXT5 compressed format, 8 bits per pixel. */
|
|
30
40
|
BC3 = 11,
|
|
31
|
-
/** RGB(A) compressed format,
|
|
41
|
+
/** RGB(A) BPTC compressed format, 8 bits per pixel. */
|
|
32
42
|
BC7 = 12,
|
|
33
|
-
/** RGB HDR compressed format, 8 bits per pixel. */
|
|
43
|
+
/** RGB unsigned float HDR BPTC compressed format, 8 bits per pixel. */
|
|
34
44
|
BC6H = 100,
|
|
35
|
-
/** RGB compressed format, 4 bits per pixel. */
|
|
45
|
+
/** RGB ETC1 compressed format, 4 bits per pixel. */
|
|
36
46
|
ETC1_RGB = 13,
|
|
37
|
-
/** RGB compressed format, 4 bits per pixel. */
|
|
47
|
+
/** RGB ETC2 compressed format, 4 bits per pixel. */
|
|
38
48
|
ETC2_RGB = 14,
|
|
39
|
-
/** RGBA compressed format,
|
|
49
|
+
/** RGBA ETC2 punchthrough-alpha compressed format, 4 bits per pixel. */
|
|
40
50
|
ETC2_RGBA5 = 15,
|
|
41
|
-
/**
|
|
51
|
+
/** RGBA ETC2 EAC compressed format, 8 bits per pixel. */
|
|
42
52
|
ETC2_RGBA8 = 16,
|
|
43
|
-
/** RGB compressed format, 2 bits per pixel. */
|
|
53
|
+
/** RGB PVRTC compressed format, 2 bits per pixel. */
|
|
44
54
|
PVRTC_RGB2 = 17,
|
|
45
|
-
/** RGBA compressed format, 2 bits per pixel. */
|
|
55
|
+
/** RGBA PVRTC compressed format, 2 bits per pixel. */
|
|
46
56
|
PVRTC_RGBA2 = 18,
|
|
47
|
-
/** RGB compressed format, 4 bits per pixel. */
|
|
57
|
+
/** RGB PVRTC compressed format, 4 bits per pixel. */
|
|
48
58
|
PVRTC_RGB4 = 19,
|
|
49
|
-
/** RGBA compressed format, 4 bits per pixel. */
|
|
59
|
+
/** RGBA PVRTC compressed format, 4 bits per pixel. */
|
|
50
60
|
PVRTC_RGBA4 = 20,
|
|
51
|
-
/** RGB(A) compressed format, 128 bits per 4x4
|
|
61
|
+
/** RGB(A) ASTC compressed format, 128 bits per 4x4 block. */
|
|
52
62
|
ASTC_4x4 = 21,
|
|
53
|
-
/** RGB(A) compressed format, 128 bits per 5x5
|
|
63
|
+
/** RGB(A) ASTC compressed format, 128 bits per 5x5 block. */
|
|
54
64
|
ASTC_5x5 = 22,
|
|
55
|
-
/** RGB(A) compressed format, 128 bits per 6x6
|
|
65
|
+
/** RGB(A) ASTC compressed format, 128 bits per 6x6 block. */
|
|
56
66
|
ASTC_6x6 = 23,
|
|
57
|
-
/** RGB(A) compressed format, 128 bits per 8x8
|
|
67
|
+
/** RGB(A) ASTC compressed format, 128 bits per 8x8 block. */
|
|
58
68
|
ASTC_8x8 = 24,
|
|
59
|
-
/** RGB(A) compressed format, 128 bits per 10x10
|
|
69
|
+
/** RGB(A) ASTC compressed format, 128 bits per 10x10 block. */
|
|
60
70
|
ASTC_10x10 = 25,
|
|
61
|
-
/** RGB(A) compressed format, 128 bits per 12x12
|
|
71
|
+
/** RGB(A) ASTC compressed format, 128 bits per 12x12 block. */
|
|
62
72
|
ASTC_12x12 = 26,
|
|
63
|
-
/**
|
|
73
|
+
/** Default depth format (32-bit float depth). */
|
|
64
74
|
Depth = 27,
|
|
65
|
-
/**
|
|
75
|
+
/** 8-bit stencil format (for `RenderTarget` only). */
|
|
66
76
|
Stencil = 28,
|
|
67
|
-
/**
|
|
77
|
+
/** Default depth-stencil format (32-bit float depth + 8-bit stencil). */
|
|
68
78
|
DepthStencil = 29,
|
|
69
|
-
/** 16-bit depth format. */
|
|
79
|
+
/** 16-bit unsigned normalized depth format. */
|
|
70
80
|
Depth16 = 30,
|
|
71
|
-
/** 24-bit depth format. */
|
|
81
|
+
/** 24-bit unsigned normalized depth format. */
|
|
72
82
|
Depth24 = 31,
|
|
73
|
-
/** 32-bit depth format. */
|
|
83
|
+
/** 32-bit float depth format. */
|
|
74
84
|
Depth32 = 32,
|
|
75
|
-
/**
|
|
85
|
+
/** 24-bit depth + 8-bit stencil format. */
|
|
76
86
|
Depth24Stencil8 = 33,
|
|
77
|
-
/** 32-bit depth + 8-bit stencil format. */
|
|
87
|
+
/** 32-bit float depth + 8-bit stencil format. */
|
|
78
88
|
Depth32Stencil8 = 34
|
|
79
89
|
}
|