@galacean/engine-core 1.4.15 → 1.5.0-alpha.0

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 (36) hide show
  1. package/dist/main.js +15817 -15240
  2. package/dist/main.js.map +1 -1
  3. package/dist/module.js +15815 -15241
  4. package/dist/module.js.map +1 -1
  5. package/package.json +3 -3
  6. package/types/Background.d.ts +8 -6
  7. package/types/Camera.d.ts +6 -0
  8. package/types/Engine.d.ts +0 -3
  9. package/types/EngineSettings.d.ts +0 -3
  10. package/types/RenderPipeline/BasicRenderPipeline.d.ts +3 -3
  11. package/types/RenderPipeline/Blitter.d.ts +1 -1
  12. package/types/SystemInfo.d.ts +9 -1
  13. package/types/base/Constant.d.ts +3 -1
  14. package/types/enums/AntiAliasing.d.ts +7 -0
  15. package/types/index.d.ts +1 -1
  16. package/types/particle/ParticleGenerator.d.ts +3 -0
  17. package/types/particle/modules/ForceOverLifetimeModule.d.ts +51 -0
  18. package/types/particle/modules/ParticleGeneratorModule.d.ts +2 -0
  19. package/types/particle/modules/SizeOverLifetimeModule.d.ts +0 -1
  20. package/types/particle/modules/VelocityOverLifetimeModule.d.ts +5 -6
  21. package/types/particle/modules/shape/MeshShape.d.ts +21 -0
  22. package/types/particle/modules/shape/enums/ParticleShapeType.d.ts +3 -1
  23. package/types/particle/modules/shape/index.d.ts +4 -3
  24. package/types/postProcess/FinalPass.d.ts +1 -0
  25. package/types/postProcess/PostProcessManager.d.ts +1 -0
  26. package/types/postProcess/index.d.ts +1 -0
  27. package/types/shaderlib/ShaderLib.d.ts +1 -0
  28. package/types/shaderlib/particle/index.d.ts +1 -0
  29. package/types/texture/Texture.d.ts +7 -0
  30. package/types/texture/Texture2D.d.ts +3 -2
  31. package/types/texture/Texture2DArray.d.ts +2 -1
  32. package/types/texture/TextureCube.d.ts +2 -1
  33. package/types/texture/TextureUtils.d.ts +1 -0
  34. package/types/texture/enums/TextureFormat.d.ts +8 -4
  35. package/types/texture/index.d.ts +1 -0
  36. package/types/enums/ColorSpace.d.ts +0 -9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@galacean/engine-core",
3
- "version": "1.4.15",
3
+ "version": "1.5.0-alpha.0",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -18,10 +18,10 @@
18
18
  "types/**/*"
19
19
  ],
20
20
  "dependencies": {
21
- "@galacean/engine-math": "1.4.15"
21
+ "@galacean/engine-math": "1.5.0-alpha.0"
22
22
  },
23
23
  "devDependencies": {
24
- "@galacean/engine-design": "1.4.15"
24
+ "@galacean/engine-design": "1.5.0-alpha.0"
25
25
  },
26
26
  "scripts": {
27
27
  "b:types": "tsc"
@@ -15,18 +15,20 @@ export declare class Background {
15
15
  * @remarks If using `BackgroundMode.Sky` mode and material or mesh of the `sky` is not defined, it will downgrade to `BackgroundMode.SolidColor`.
16
16
  */
17
17
  mode: BackgroundMode;
18
- /**
19
- * Background solid color.
20
- * @defaultValue `new Color(0.25, 0.25, 0.25, 1.0)`
21
- * @remarks When `mode` is `BackgroundMode.SolidColor`, the property will take effects.
22
- */
23
- solidColor: Color;
24
18
  /**
25
19
  * Background sky.
26
20
  * @remarks When `mode` is `BackgroundMode.Sky`, the property will take effects.
27
21
  */
28
22
  readonly sky: Sky;
23
+ private _solidColor;
29
24
  private _texture;
25
+ /**
26
+ * Background solid color.
27
+ * @defaultValue `new Color(0.25, 0.25, 0.25, 1.0)`
28
+ * @remarks When `mode` is `BackgroundMode.SolidColor`, the property will take effects.
29
+ */
30
+ get solidColor(): Color;
31
+ set solidColor(value: Color);
30
32
  /**
31
33
  * Background texture.
32
34
  * @remarks When `mode` is `BackgroundMode.Texture`, the property will take effects.
package/types/Camera.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { Matrix, Ray, Rect, Vector2, Vector3, Vector4 } from "@galacean/engine-math";
2
2
  import { Component } from "./Component";
3
3
  import { Layer } from "./Layer";
4
+ import { AntiAliasing } from "./enums/AntiAliasing";
4
5
  import { CameraClearFlags } from "./enums/CameraClearFlags";
5
6
  import { DepthTextureMode } from "./enums/DepthTextureMode";
6
7
  import { Downsampling } from "./enums/Downsampling";
@@ -57,6 +58,11 @@ export declare class Camera extends Component {
57
58
  * @remarks It will take effect when `independentCanvasEnabled` property is `true`, otherwise it will be invalid.
58
59
  */
59
60
  msaaSamples: MSAASamples;
61
+ /**
62
+ * Anti-aliasing mode.
63
+ * @defaultValue `AntiAliasing.None`
64
+ */
65
+ antiAliasing: AntiAliasing;
60
66
  private _priority;
61
67
  private _shaderData;
62
68
  private _isCustomViewMatrix;
package/types/Engine.d.ts CHANGED
@@ -5,7 +5,6 @@ import { Entity } from "./Entity";
5
5
  import { SceneManager } from "./SceneManager";
6
6
  import { ResourceManager } from "./asset/ResourceManager";
7
7
  import { EventDispatcher, Time } from "./base";
8
- import { ColorSpace } from "./enums/ColorSpace";
9
8
  import { InputManager } from "./input";
10
9
  import { ParticleBufferUtils } from "./particle/ParticleBufferUtils";
11
10
  import { PhysicsScene } from "./physics/PhysicsScene";
@@ -146,8 +145,6 @@ export interface EngineConfiguration {
146
145
  physics?: IPhysics;
147
146
  /** XR Device. */
148
147
  xrDevice?: IXRDevice;
149
- /** Color space. */
150
- colorSpace?: ColorSpace;
151
148
  /** Shader lab. */
152
149
  shaderLab?: IShaderLab;
153
150
  /** Input options. */
@@ -1,8 +1,5 @@
1
- import { ColorSpace } from "./enums/ColorSpace";
2
1
  /**
3
2
  * Render settings.
4
3
  */
5
4
  export interface EngineSettings {
6
- /** Color space.*/
7
- colorSpace?: ColorSpace;
8
5
  }
@@ -13,10 +13,10 @@ export declare class BasicRenderPipeline {
13
13
  private _cascadedShadowCasterPass;
14
14
  private _depthOnlyPass;
15
15
  private _opaqueTexturePass;
16
- private _grabTexture;
16
+ private _finalPass;
17
+ private _copyBackgroundTexture;
17
18
  private _canUseBlitFrameBuffer;
18
- private _shouldGrabColor;
19
- private _sourceScaleOffset;
19
+ private _shouldCopyBackgroundColor;
20
20
  /**
21
21
  * Create a basic render pipeline.
22
22
  * @param camera - Camera
@@ -22,7 +22,7 @@ export declare class Blitter {
22
22
  * @param viewport - Viewport
23
23
  * @param material - The material to use when blit
24
24
  * @param passIndex - Pass index to use of the provided material
25
- * @param flipYOfSource - Whether flip Y axis of source texture
25
+ * @param sourceScaleOffset - Source scale and offset
26
26
  */
27
27
  static blitTexture(engine: Engine, source: Texture2D, destination: RenderTarget | null, mipLevel?: number, viewport?: Vector4, material?: Material, passIndex?: number, sourceScaleOffset?: Vector4): void;
28
28
  }
@@ -1,6 +1,8 @@
1
+ import { Engine } from "./Engine";
1
2
  import { Platform } from "./Platform";
3
+ import { TextureFormat } from "./texture";
2
4
  /**
3
- * System info.
5
+ * Access operating system, platform and hardware information.
4
6
  */
5
7
  export declare class SystemInfo {
6
8
  /** The platform is running on. */
@@ -13,4 +15,10 @@ export declare class SystemInfo {
13
15
  * The pixel ratio of the device.
14
16
  */
15
17
  static get devicePixelRatio(): number;
18
+ /**
19
+ * Checks whether the system supports the given texture format.
20
+ * @param format - The texture format
21
+ * @returns Whether support the texture format
22
+ */
23
+ static supportsTextureFormat(engine: Engine, format: TextureFormat): boolean;
16
24
  }
@@ -107,7 +107,9 @@ export declare enum GLCapabilityType {
107
107
  pvrtc_webkit = "WEBKIT_WEBGL_compressed_texture_pvrtc",
108
108
  s3tc = "WEBGL_compressed_texture_s3tc",
109
109
  s3tc_webkit = "WEBKIT_WEBGL_compressed_texture_s3tc",
110
+ s3tc_srgb = "WEBGL_compressed_texture_s3tc_srgb",
110
111
  bptc = "EXT_texture_compression_bptc",
111
- WEBGL_lose_context = "WEBGL_lose_context"
112
+ WEBGL_lose_context = "WEBGL_lose_context",
113
+ sRGB = "EXT_sRGB"
112
114
  }
113
115
  export type TypedArray = Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * The anti-aliasing mode.
3
+ */
4
+ export declare enum AntiAliasing {
5
+ None = 0,
6
+ FXAA = 1
7
+ }
package/types/index.d.ts CHANGED
@@ -37,7 +37,6 @@ export { EntityModifyFlags } from "./enums/EntityModifyFlags";
37
37
  export { MSAASamples } from "./enums/MSAASamples";
38
38
  export { ReplacementFailureStrategy } from "./enums/ReplacementFailureStrategy";
39
39
  export { Downsampling } from "./enums/Downsampling";
40
- export { ColorSpace } from "./enums/ColorSpace";
41
40
  export { BackgroundTextureFillMode } from "./enums/BackgroundTextureFillMode";
42
41
  export { SpriteMaskLayer } from "./enums/SpriteMaskLayer";
43
42
  export { XRManager } from "./xr/XRManager";
@@ -65,3 +64,4 @@ export * from "./Utils";
65
64
  export * from "./audio/index";
66
65
  export { ShaderMacroCollection } from "./shader/ShaderMacroCollection";
67
66
  export * from "./postProcess";
67
+ export { AntiAliasing } from "./enums/AntiAliasing";
@@ -6,6 +6,7 @@ import { RotationOverLifetimeModule } from "./modules/RotationOverLifetimeModule
6
6
  import { SizeOverLifetimeModule } from "./modules/SizeOverLifetimeModule";
7
7
  import { TextureSheetAnimationModule } from "./modules/TextureSheetAnimationModule";
8
8
  import { VelocityOverLifetimeModule } from "./modules/VelocityOverLifetimeModule";
9
+ import { ForceOverLifetimeModule } from "./modules/ForceOverLifetimeModule";
9
10
  /**
10
11
  * Particle Generator.
11
12
  */
@@ -28,6 +29,8 @@ export declare class ParticleGenerator {
28
29
  readonly emission: EmissionModule;
29
30
  /** Velocity over lifetime module. */
30
31
  readonly velocityOverLifetime: VelocityOverLifetimeModule;
32
+ /** Force over lifetime module. */
33
+ readonly forceOverLifetime: ForceOverLifetimeModule;
31
34
  /** Size over lifetime module. */
32
35
  readonly sizeOverLifetime: SizeOverLifetimeModule;
33
36
  /** Rotation over lifetime module. */
@@ -0,0 +1,51 @@
1
+ import { ShaderMacro, ShaderProperty } from "../../shader";
2
+ import { ParticleSimulationSpace } from "../enums/ParticleSimulationSpace";
3
+ import { ParticleGenerator } from "../ParticleGenerator";
4
+ import { ParticleCompositeCurve } from "./ParticleCompositeCurve";
5
+ import { ParticleGeneratorModule } from "./ParticleGeneratorModule";
6
+ /**
7
+ * Force over lifetime module.
8
+ */
9
+ export declare class ForceOverLifetimeModule extends ParticleGeneratorModule {
10
+ static readonly _constantModeMacro: ShaderMacro;
11
+ static readonly _curveModeMacro: ShaderMacro;
12
+ static readonly _isRandomMacro: ShaderMacro;
13
+ static readonly _minConstantProperty: ShaderProperty;
14
+ static readonly _maxConstantProperty: ShaderProperty;
15
+ static readonly _minGradientXProperty: ShaderProperty;
16
+ static readonly _minGradientYProperty: ShaderProperty;
17
+ static readonly _minGradientZProperty: ShaderProperty;
18
+ static readonly _maxGradientXProperty: ShaderProperty;
19
+ static readonly _maxGradientYProperty: ShaderProperty;
20
+ static readonly _maxGradientZProperty: ShaderProperty;
21
+ static readonly _spaceProperty: ShaderProperty;
22
+ private _forceMinConstant;
23
+ private _forceMaxConstant;
24
+ private _forceMacro;
25
+ private _randomModeMacro;
26
+ private _forceX;
27
+ private _forceY;
28
+ private _forceZ;
29
+ private _space;
30
+ /**
31
+ * Force over lifetime for x axis.
32
+ */
33
+ get forceX(): ParticleCompositeCurve;
34
+ set forceX(value: ParticleCompositeCurve);
35
+ /**
36
+ * Force over lifetime for y axis.
37
+ */
38
+ get forceY(): ParticleCompositeCurve;
39
+ set forceY(value: ParticleCompositeCurve);
40
+ /**
41
+ * Force over lifetime for z axis.
42
+ */
43
+ get forceZ(): ParticleCompositeCurve;
44
+ set forceZ(value: ParticleCompositeCurve);
45
+ /**
46
+ * Force space.
47
+ */
48
+ get space(): ParticleSimulationSpace;
49
+ set space(value: ParticleSimulationSpace);
50
+ constructor(generator: ParticleGenerator);
51
+ }
@@ -1,5 +1,6 @@
1
1
  import { ShaderData, ShaderMacro } from "../../shader";
2
2
  import { ParticleGenerator } from "../ParticleGenerator";
3
+ import { ParticleCompositeCurve } from "./ParticleCompositeCurve";
3
4
  /**
4
5
  * Particle generator module.
5
6
  */
@@ -12,4 +13,5 @@ export declare abstract class ParticleGeneratorModule {
12
13
  get enabled(): boolean;
13
14
  set enabled(value: boolean);
14
15
  protected _enableMacro(shaderData: ShaderData, lastEnableMacro: ShaderMacro, enableMacro: ShaderMacro): ShaderMacro;
16
+ protected _onCompositeCurveChange(lastValue: ParticleCompositeCurve, value: ParticleCompositeCurve): void;
15
17
  }
@@ -49,5 +49,4 @@ export declare class SizeOverLifetimeModule extends ParticleGeneratorModule {
49
49
  get size(): ParticleCompositeCurve;
50
50
  set size(value: ParticleCompositeCurve);
51
51
  constructor(generator: ParticleGenerator);
52
- private _onCompositeCurveChange;
53
52
  }
@@ -1,17 +1,16 @@
1
1
  import { ShaderMacro } from "../../shader";
2
2
  import { ShaderProperty } from "../../shader/ShaderProperty";
3
3
  import { ParticleSimulationSpace } from "../enums/ParticleSimulationSpace";
4
+ import { ParticleGenerator } from "../ParticleGenerator";
4
5
  import { ParticleCompositeCurve } from "./ParticleCompositeCurve";
5
6
  import { ParticleGeneratorModule } from "./ParticleGeneratorModule";
6
- import { ParticleGenerator } from "../ParticleGenerator";
7
7
  /**
8
8
  * Velocity over lifetime module.
9
9
  */
10
10
  export declare class VelocityOverLifetimeModule extends ParticleGeneratorModule {
11
- static readonly _constantMacro: ShaderMacro;
12
- static readonly _curveMacro: ShaderMacro;
13
- static readonly _randomConstantMacro: ShaderMacro;
14
- static readonly _randomCurveMacro: ShaderMacro;
11
+ static readonly _constantModeMacro: ShaderMacro;
12
+ static readonly _curveModeMacro: ShaderMacro;
13
+ static readonly _isRandomMacro: ShaderMacro;
15
14
  static readonly _minConstantProperty: ShaderProperty;
16
15
  static readonly _maxConstantProperty: ShaderProperty;
17
16
  static readonly _minGradientXProperty: ShaderProperty;
@@ -24,6 +23,7 @@ export declare class VelocityOverLifetimeModule extends ParticleGeneratorModule
24
23
  private _velocityMinConstant;
25
24
  private _velocityMaxConstant;
26
25
  private _velocityMacro;
26
+ private _randomModeMacro;
27
27
  private _velocityX;
28
28
  private _velocityY;
29
29
  private _velocityZ;
@@ -51,5 +51,4 @@ export declare class VelocityOverLifetimeModule extends ParticleGeneratorModule
51
51
  get enabled(): boolean;
52
52
  set enabled(value: boolean);
53
53
  constructor(generator: ParticleGenerator);
54
- private _onCompositeCurveChange;
55
54
  }
@@ -0,0 +1,21 @@
1
+ import { ModelMesh } from "../../../mesh";
2
+ import { BaseShape } from "./BaseShape";
3
+ import { ParticleShapeType } from "./enums/ParticleShapeType";
4
+ /**
5
+ * Particle shape that emits particles from a mesh.
6
+ */
7
+ export declare class MeshShape extends BaseShape {
8
+ readonly shapeType = ParticleShapeType.Mesh;
9
+ private _mesh;
10
+ private _positionBuffer;
11
+ private _normalBuffer;
12
+ private _positionElementInfo;
13
+ private _normalElementInfo;
14
+ /**
15
+ * Mesh to emit particles from.
16
+ */
17
+ get mesh(): ModelMesh;
18
+ set mesh(value: ModelMesh);
19
+ private _getAttributeBuffer;
20
+ private _onMeshChanged;
21
+ }
@@ -11,5 +11,7 @@ export declare enum ParticleShapeType {
11
11
  /** Emit from a half-sphere. */
12
12
  Hemisphere = 3,
13
13
  /** Emit from a sphere. */
14
- Sphere = 4
14
+ Sphere = 4,
15
+ /** Emit from a mesh. */
16
+ Mesh = 5
15
17
  }
@@ -1,7 +1,8 @@
1
1
  export { BoxShape } from "./BoxShape";
2
2
  export { CircleShape } from "./CircleShape";
3
- export { ConeShape, ConeEmitType } from "./ConeShape";
4
- export { HemisphereShape } from "./HemisphereShape";
5
- export { SphereShape } from "./SphereShape";
3
+ export { ConeEmitType, ConeShape } from "./ConeShape";
6
4
  export { ParticleShapeArcMode } from "./enums/ParticleShapeArcMode";
7
5
  export { ParticleShapeType } from "./enums/ParticleShapeType";
6
+ export { HemisphereShape } from "./HemisphereShape";
7
+ export { MeshShape } from "./MeshShape";
8
+ export { SphereShape } from "./SphereShape";
@@ -0,0 +1 @@
1
+ export {};
@@ -16,6 +16,7 @@ export declare class PostProcessManager {
16
16
  private _blendEffectMap;
17
17
  private _defaultEffectMap;
18
18
  private _remainActivePassCount;
19
+ private _outputRenderTarget;
19
20
  /**
20
21
  * Create a PostProcessManager.
21
22
  * @param scene - Scene to which the current PostProcessManager belongs
@@ -5,3 +5,4 @@ export { PostProcessEffectBoolParameter, PostProcessEffectColorParameter, PostPr
5
5
  export { PostProcessManager } from "./PostProcessManager";
6
6
  export { PostProcessPass, PostProcessPassEvent } from "./PostProcessPass";
7
7
  export { PostProcessUberPass } from "./PostProcessUberPass";
8
+ export { FinalPass } from "./FinalPass";
@@ -5,6 +5,7 @@ export declare const ShaderLib: {
5
5
  size_over_lifetime_module: string;
6
6
  color_over_lifetime_module: string;
7
7
  texture_sheet_animation_module: string;
8
+ force_over_lifetime_module: string;
8
9
  sphere_billboard: string;
9
10
  stretched_billboard: string;
10
11
  vertical_billboard: string;
@@ -5,6 +5,7 @@ declare const _default: {
5
5
  size_over_lifetime_module: string;
6
6
  color_over_lifetime_module: string;
7
7
  texture_sheet_animation_module: string;
8
+ force_over_lifetime_module: string;
8
9
  sphere_billboard: string;
9
10
  stretched_billboard: string;
10
11
  vertical_billboard: string;
@@ -1,4 +1,5 @@
1
1
  import { GraphicsResource } from "../asset/GraphicsResource";
2
+ import { Engine } from "../Engine";
2
3
  import { TextureDepthCompareFunction } from "./enums/TextureDepthCompareFunction";
3
4
  import { TextureFilterMode } from "./enums/TextureFilterMode";
4
5
  import { TextureFormat } from "./enums/TextureFormat";
@@ -14,12 +15,17 @@ export declare abstract class Texture extends GraphicsResource {
14
15
  protected _height: number;
15
16
  protected _usage: TextureUsage;
16
17
  protected _mipmapCount: number;
18
+ protected _isSRGBColorSpace: boolean;
17
19
  private _wrapModeU;
18
20
  private _wrapModeV;
19
21
  private _filterMode;
20
22
  private _anisoLevel;
21
23
  private _depthCompareFunction;
22
24
  private _useDepthCompareMode;
25
+ /**
26
+ * Whether the texture data is in sRGB color space, otherwise is linear color space.
27
+ */
28
+ get isSRGBColorSpace(): boolean;
23
29
  /**
24
30
  * Texture format.
25
31
  */
@@ -66,6 +72,7 @@ export declare abstract class Texture extends GraphicsResource {
66
72
  */
67
73
  get depthCompareFunction(): TextureDepthCompareFunction;
68
74
  set depthCompareFunction(value: TextureDepthCompareFunction);
75
+ constructor(engine: Engine, width: number, height: number, format: TextureFormat, mipmap: boolean, isSRGBColorSpace: boolean);
69
76
  /**
70
77
  * Generate multi-level textures based on the 0th level data.
71
78
  */
@@ -11,11 +11,12 @@ 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.R8G8B8A8`
14
+ * @param format - Texture format. default `TextureFormat.R8G8B8A8`
15
15
  * @param mipmap - Whether to use multi-level texture
16
+ * @param isSRGBColorSpace - Whether the texture data is in sRGB color space, otherwise is linear color space. @defaultValue `true`
16
17
  * @param usage - Texture usage
17
18
  */
18
- constructor(engine: Engine, width: number, height: number, format?: TextureFormat, mipmap?: boolean, usage?: TextureUsage);
19
+ constructor(engine: Engine, width: number, height: number, format?: TextureFormat, mipmap?: boolean, isSRGBColorSpace?: boolean, usage?: TextureUsage);
19
20
  /**
20
21
  * Setting pixels data through color buffer data, designated area and texture mipmapping level,it's also applicable to compressed formats.
21
22
  * @remarks If it is the WebGL1.0 platform and the texture format is compressed, the first upload must be filled with textures.
@@ -18,8 +18,9 @@ export declare class Texture2DArray extends Texture {
18
18
  * @param length - Texture length
19
19
  * @param format - Texture format. default `TextureFormat.R8G8B8A8`
20
20
  * @param mipmap - Whether to use multi-level texture
21
+ * @param isSRGBColorSpace - Whether the texture data is in sRGB color space, otherwise is linear color space. @defaultValue `true`
21
22
  */
22
- constructor(engine: Engine, width: number, height: number, length: number, format?: TextureFormat, mipmap?: boolean);
23
+ constructor(engine: Engine, width: number, height: number, length: number, format?: TextureFormat, mipmap?: boolean, isSRGBColorSpace?: boolean);
23
24
  /**
24
25
  * Setting pixels data through color buffer data, designated area and texture mipmapping level,it's also applicable to compressed formats.
25
26
  * @remarks If it is the WebGL1.0 platform and the texture format is compressed, the first upload must be filled with textures.
@@ -12,8 +12,9 @@ export declare class TextureCube extends Texture {
12
12
  * @param size - Texture size. texture width must be equal to height in cube texture
13
13
  * @param format - Texture format,default TextureFormat.R8G8B8A8
14
14
  * @param mipmap - Whether to use multi-level texture
15
+ * @param isSRGBColorSpace - Whether the texture data is in sRGB color space, otherwise is linear color space. @defaultValue `true`
15
16
  */
16
- constructor(engine: Engine, size: number, format?: TextureFormat, mipmap?: boolean);
17
+ constructor(engine: Engine, size: number, format?: TextureFormat, mipmap?: boolean, isSRGBColorSpace?: boolean);
17
18
  /**
18
19
  * Setting pixels data through cube face,color buffer data, designated area and texture mipmapping level,it's also applicable to compressed formats.
19
20
  * @remarks When compressed texture is in WebGL1, the texture must be filled first before writing the sub-region
@@ -0,0 +1 @@
1
+ export {};
@@ -12,10 +12,6 @@ export declare enum TextureFormat {
12
12
  R5G5B5A1 = 3,
13
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. */
16
- Alpha8 = 5,
17
- /** Luminance/alpha in RGB channel, alpha in A channel. */
18
- LuminanceAlpha = 6,
19
15
  /** RGBA format, 16 bits per channel. */
20
16
  R16G16B16A16 = 7,
21
17
  /** RGBA format, 32 bits per channel. */
@@ -24,6 +20,10 @@ export declare enum TextureFormat {
24
20
  R32G32B32A32_UInt = 9,
25
21
  /** RGB unsigned float format, 11 bits in R channel, 11 bits in G channel, 10 bits in B channel. */
26
22
  R11G11B10_UFloat = 35,
23
+ /** R float format, 8 bits. */
24
+ R8 = 36,
25
+ /** RG float format, 8 bits per channel. */
26
+ R8G8 = 37,
27
27
  /** RGB compressed format, 4 bits per pixel. */
28
28
  BC1 = 10,
29
29
  /** RGBA compressed format, 8 bits per pixel. */
@@ -74,6 +74,10 @@ export declare enum TextureFormat {
74
74
  Depth24Stencil8 = 33,
75
75
  /** 32-bit depth + 8-bit stencil format. */
76
76
  Depth32Stencil8 = 34,
77
+ /** @deprecated Use 'TextureFormat.R8' instead. */
78
+ Alpha8 = 5,
79
+ /** @deprecated Use 'TextureFormat.R8G8' instead. */
80
+ LuminanceAlpha = 6,
77
81
  /** @deprecated Use `TextureFormat.BC1` instead. */
78
82
  DXT1 = 10,
79
83
  /** @deprecated Use `TextureFormat.BC3` instead. */
@@ -10,3 +10,4 @@ export { Texture } from "./Texture";
10
10
  export { Texture2D } from "./Texture2D";
11
11
  export { Texture2DArray } from "./Texture2DArray";
12
12
  export { TextureCube } from "./TextureCube";
13
+ export { TextureUtils } from "./TextureUtils";
@@ -1,9 +0,0 @@
1
- /**
2
- * Color Space.
3
- */
4
- export declare enum ColorSpace {
5
- /** Linear color space. */
6
- Linear = 0,
7
- /** Gamma color space. */
8
- Gamma = 1
9
- }