@galacean/engine-core 1.3.0-alpha.1 → 1.3.0-alpha.2
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 +131 -57
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +131 -57
- package/dist/module.js +132 -58
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
- package/types/Camera.d.ts +7 -4
- package/types/enums/ReplacementFailureStrategy.d.ts +9 -0
- package/types/index.d.ts +1 -0
- package/types/shader/ShaderPass.d.ts +10 -0
- package/types/shader/index.d.ts +1 -0
- package/types/shaderlib/ShaderFactory.d.ts +2 -1
- package/types/2d/assembler/IAssembler.d.ts +0 -1
- package/types/2d/data/VertexData2D.d.ts +0 -1
- package/types/2d/text/CharRenderData.d.ts +0 -1
- package/types/2d/text/CharRenderDataPool.d.ts +0 -1
- package/types/Deprecated.d.ts +0 -101
- package/types/RenderPipeline/Basic2DBatcher.d.ts +0 -19
- package/types/RenderPipeline/Chunk.d.ts +0 -1
- package/types/RenderPipeline/ClassPool.d.ts +0 -19
- package/types/RenderPipeline/DynamicGeometryData.d.ts +0 -1
- package/types/RenderPipeline/DynamicGeometryDataManager.d.ts +0 -1
- package/types/RenderPipeline/IPoolElement.d.ts +0 -3
- package/types/RenderPipeline/RenderData.d.ts +0 -14
- package/types/RenderPipeline/RenderData2D.d.ts +0 -14
- package/types/RenderPipeline/RenderPass.d.ts +0 -55
- package/types/RenderPipeline/SpriteBatcher.d.ts +0 -1
- package/types/RenderPipeline/SpriteMaskBatcher.d.ts +0 -11
- package/types/RenderPipeline/SpriteMaskManager.d.ts +0 -1
- package/types/RenderPipeline/SpriteMaskRenderData.d.ts +0 -12
- package/types/RenderPipeline/SpriteRenderData.d.ts +0 -14
- package/types/RenderPipeline/TextRenderData.d.ts +0 -8
- package/types/RenderPipeline/batcher/MeshBuffer.d.ts +0 -1
- package/types/RenderPipeline/enums/ForceUploadShaderDataFlag.d.ts +0 -15
- package/types/RenderPipeline/enums/RenderBufferStoreAction.d.ts +0 -13
- package/types/RenderPipeline/enums/RenderDataUsage.d.ts +0 -13
- package/types/animation/AnimatorTransition.d.ts +0 -14
- package/types/postProcess/PostProcessEffect.d.ts +0 -13
- package/types/postProcess/PostProcessPass.d.ts +0 -55
- package/types/renderingHardwareInterface/IHardwareRenderer.d.ts +0 -6
- package/types/texture/enums/PixelFormat.d.ts +0 -73
- package/types/utils/Pool.d.ts +0 -12
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/engine-core",
|
|
3
|
-
"version": "1.3.0-alpha.
|
|
3
|
+
"version": "1.3.0-alpha.2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
"types/**/*"
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@galacean/engine-math": "1.3.0-alpha.
|
|
18
|
+
"@galacean/engine-math": "1.3.0-alpha.2"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@galacean/engine-design": "1.3.0-alpha.
|
|
21
|
+
"@galacean/engine-design": "1.3.0-alpha.2"
|
|
22
22
|
},
|
|
23
23
|
"scripts": {
|
|
24
24
|
"b:types": "tsc"
|
package/types/Camera.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { CameraClearFlags } from "./enums/CameraClearFlags";
|
|
|
5
5
|
import { DepthTextureMode } from "./enums/DepthTextureMode";
|
|
6
6
|
import { Downsampling } from "./enums/Downsampling";
|
|
7
7
|
import { MSAASamples } from "./enums/MSAASamples";
|
|
8
|
+
import { ReplacementFailureStrategy } from "./enums/ReplacementFailureStrategy";
|
|
8
9
|
import { Shader } from "./shader/Shader";
|
|
9
10
|
import { ShaderData } from "./shader/ShaderData";
|
|
10
11
|
import { ShaderTagKey } from "./shader/ShaderTagKey";
|
|
@@ -254,22 +255,24 @@ export declare class Camera extends Component {
|
|
|
254
255
|
* Set the replacement shader.
|
|
255
256
|
* @param shader - Replacement shader
|
|
256
257
|
* @param replacementTagName - Sub shader tag name
|
|
258
|
+
* @param failureStrategy - Replacement failure strategy, @defaultValue `ReplacementFailureStrategy.KeepOriginalShader`
|
|
257
259
|
*
|
|
258
260
|
* @remarks
|
|
259
261
|
* If replacementTagName is not specified, the first sub shader will be replaced.
|
|
260
|
-
* If replacementTagName is specified, the replacement shader will find the first sub shader which has the same tag value get by replacementTagKey.
|
|
262
|
+
* If replacementTagName is specified, the replacement shader will find the first sub shader which has the same tag value get by replacementTagKey. If failed to find the sub shader, the strategy will be determined by failureStrategy.
|
|
261
263
|
*/
|
|
262
|
-
setReplacementShader(shader: Shader, replacementTagName?: string): any;
|
|
264
|
+
setReplacementShader(shader: Shader, replacementTagName?: string, failureStrategy?: ReplacementFailureStrategy): any;
|
|
263
265
|
/**
|
|
264
266
|
* Set the replacement shader.
|
|
265
267
|
* @param shader - Replacement shader
|
|
266
268
|
* @param replacementTag - Sub shader tag
|
|
269
|
+
* @param failureStrategy - Replacement failure strategy, @defaultValue `ReplacementFailureStrategy.KeepOriginalShader`
|
|
267
270
|
*
|
|
268
271
|
* @remarks
|
|
269
272
|
* If replacementTag is not specified, the first sub shader will be replaced.
|
|
270
|
-
* If replacementTag is specified, the replacement shader will find the first sub shader which has the same tag value get by replacementTagKey.
|
|
273
|
+
* If replacementTag is specified, the replacement shader will find the first sub shader which has the same tag value get by replacementTagKey. If failed to find the sub shader, the strategy will be determined by failureStrategy.
|
|
271
274
|
*/
|
|
272
|
-
setReplacementShader(shader: Shader, replacementTag?: ShaderTagKey): any;
|
|
275
|
+
setReplacementShader(shader: Shader, replacementTag?: ShaderTagKey, failureStrategy?: ReplacementFailureStrategy): any;
|
|
273
276
|
/**
|
|
274
277
|
* Reset and clear the replacement shader.
|
|
275
278
|
*/
|
package/types/index.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ export { FogMode } from "./enums/FogMode";
|
|
|
31
31
|
export { CameraClearFlags } from "./enums/CameraClearFlags";
|
|
32
32
|
export { CameraType } from "./enums/CameraType";
|
|
33
33
|
export { MSAASamples } from "./enums/MSAASamples";
|
|
34
|
+
export { ReplacementFailureStrategy } from "./enums/ReplacementFailureStrategy";
|
|
34
35
|
export { Downsampling } from "./enums/Downsampling";
|
|
35
36
|
export { ColorSpace } from "./enums/ColorSpace";
|
|
36
37
|
export { BackgroundTextureFillMode } from "./enums/BackgroundTextureFillMode";
|
|
@@ -6,6 +6,11 @@ export declare class ShaderPass extends ShaderPart {
|
|
|
6
6
|
private static _shaderPassCounter;
|
|
7
7
|
private _vertexSource;
|
|
8
8
|
private _fragmentSource;
|
|
9
|
+
private readonly _type;
|
|
10
|
+
private readonly _shaderLabSource;
|
|
11
|
+
private readonly _vertexEntry;
|
|
12
|
+
private readonly _fragmentEntry;
|
|
13
|
+
private _platformMacros;
|
|
9
14
|
/**
|
|
10
15
|
* Create a shader pass.
|
|
11
16
|
* @param name - Shader pass name
|
|
@@ -21,4 +26,9 @@ export declare class ShaderPass extends ShaderPart {
|
|
|
21
26
|
* @param tags - Tags
|
|
22
27
|
*/
|
|
23
28
|
constructor(vertexSource: string, fragmentSource: string, tags?: Record<string, number | string | boolean>);
|
|
29
|
+
/**
|
|
30
|
+
* Shader Lab compilation
|
|
31
|
+
*/
|
|
32
|
+
private _compileShaderProgram;
|
|
33
|
+
private _getCanonicalShaderProgram;
|
|
24
34
|
}
|
package/types/shader/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export { RenderStateElementKey as RenderStateDataKey } from "./enums/RenderState
|
|
|
7
7
|
export { RenderQueueType } from "./enums/RenderQueueType";
|
|
8
8
|
export { ShaderPropertyType } from "./enums/ShaderPropertyType";
|
|
9
9
|
export { StencilOperation } from "./enums/StencilOperation";
|
|
10
|
+
export { ShaderPlatformTarget } from "./enums/ShaderPlatformTarget";
|
|
10
11
|
export { Shader } from "./Shader";
|
|
11
12
|
export { ShaderData } from "./ShaderData";
|
|
12
13
|
export { ShaderMacro } from "./ShaderMacro";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { ShaderMacro } from "../shader/ShaderMacro";
|
|
1
2
|
export declare class ShaderFactory {
|
|
2
3
|
private static readonly _has300OutInFragReg;
|
|
3
|
-
static parseCustomMacros(macros:
|
|
4
|
+
static parseCustomMacros(macros: ShaderMacro[]): string;
|
|
4
5
|
static registerInclude(includeName: string, includeSource: string): void;
|
|
5
6
|
static unRegisterInclude(includeName: string): void;
|
|
6
7
|
/**
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/types/Deprecated.d.ts
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @deprecated Please use `PixelFormat` instead.
|
|
3
|
-
* Defines various pixel formats.
|
|
4
|
-
*/
|
|
5
|
-
export declare enum TextureFormat {
|
|
6
|
-
/** RGB format, 8 bits per channel. */
|
|
7
|
-
R8G8B8 = 0,
|
|
8
|
-
/** RGBA format, 8 bits per channel. */
|
|
9
|
-
R8G8B8A8 = 1,
|
|
10
|
-
/** RGBA format, 4 bits per channel. */
|
|
11
|
-
R4G4B4A4 = 2,
|
|
12
|
-
/** RGBA format, 5 bits in R channel, 5 bits in G channel, 5 bits in B channel, 1 bit in A channel. */
|
|
13
|
-
R5G5B5A1 = 3,
|
|
14
|
-
/** RGB format, 5 bits in R channel, 6 bits in G channel, 5 bits in B channel. */
|
|
15
|
-
R5G6B5 = 4,
|
|
16
|
-
/** Transparent format, 8 bits. */
|
|
17
|
-
Alpha8 = 5,
|
|
18
|
-
/** Luminance/alpha in RGB channel, alpha in A channel. */
|
|
19
|
-
LuminanceAlpha = 6,
|
|
20
|
-
/** RGBA format, 16 bits per channel. */
|
|
21
|
-
R16G16B16A16 = 7,
|
|
22
|
-
/** RGBA format, 32 bits per channel. */
|
|
23
|
-
R32G32B32A32 = 8,
|
|
24
|
-
/** RGB compressed format, 4 bits per pixel. */
|
|
25
|
-
BC1 = 9,
|
|
26
|
-
/** RGBA compressed format, 8 bits per pixel. */
|
|
27
|
-
BC3 = 10,
|
|
28
|
-
/** RGB(A) compressed format, 128 bits per 4x4 pixel block. */
|
|
29
|
-
BC7 = 11,
|
|
30
|
-
/** RGB compressed format, 4 bits per pixel. */
|
|
31
|
-
ETC1_RGB = 12,
|
|
32
|
-
/** RGB compressed format, 4 bits per pixel. */
|
|
33
|
-
ETC2_RGB = 13,
|
|
34
|
-
/** RGBA compressed format, 5 bits per pixel, 4 bit in RGB, 1 bit in A. */
|
|
35
|
-
ETC2_RGBA5 = 14,
|
|
36
|
-
/** RGB compressed format, 8 bits per pixel. */
|
|
37
|
-
ETC2_RGBA8 = 15,
|
|
38
|
-
/** RGB compressed format, 2 bits per pixel. */
|
|
39
|
-
PVRTC_RGB2 = 16,
|
|
40
|
-
/** RGBA compressed format, 2 bits per pixel. */
|
|
41
|
-
PVRTC_RGBA2 = 17,
|
|
42
|
-
/** RGB compressed format, 4 bits per pixel. */
|
|
43
|
-
PVRTC_RGB4 = 18,
|
|
44
|
-
/** RGBA compressed format, 4 bits per pixel. */
|
|
45
|
-
PVRTC_RGBA4 = 19,
|
|
46
|
-
/** RGB(A) compressed format, 128 bits per 4x4 pixel block. */
|
|
47
|
-
ASTC_4x4 = 20,
|
|
48
|
-
/** RGB(A) compressed format, 128 bits per 5x5 pixel block. */
|
|
49
|
-
ASTC_5x5 = 21,
|
|
50
|
-
/** RGB(A) compressed format, 128 bits per 6x6 pixel block. */
|
|
51
|
-
ASTC_6x6 = 22,
|
|
52
|
-
/** RGB(A) compressed format, 128 bits per 8x8 pixel block. */
|
|
53
|
-
ASTC_8x8 = 23,
|
|
54
|
-
/** RGB(A) compressed format, 128 bits per 10x10 pixel block. */
|
|
55
|
-
ASTC_10x10 = 24,
|
|
56
|
-
/** RGB(A) compressed format, 128 bits per 12x12 pixel block. */
|
|
57
|
-
ASTC_12x12 = 25,
|
|
58
|
-
/** Automatic depth format, engine will automatically select the supported precision. */
|
|
59
|
-
Depth = 26,
|
|
60
|
-
/** Render to stencil buffer. */
|
|
61
|
-
Stencil = 27,
|
|
62
|
-
/** Automatic depth stencil format, engine will automatically select the supported precision. */
|
|
63
|
-
DepthStencil = 28,
|
|
64
|
-
/** 16-bit depth format. */
|
|
65
|
-
Depth16 = 29,
|
|
66
|
-
/** 24-bit depth format. */
|
|
67
|
-
Depth24 = 30,
|
|
68
|
-
/** 32-bit depth format. */
|
|
69
|
-
Depth32 = 31,
|
|
70
|
-
/** 16-bit depth + 8-bit stencil format. */
|
|
71
|
-
Depth24Stencil8 = 32,
|
|
72
|
-
/** 32-bit depth + 8-bit stencil format. */
|
|
73
|
-
Depth32Stencil8 = 33,
|
|
74
|
-
/** @deprecated Use `PixelFormat.BC1` instead. */
|
|
75
|
-
DXT1 = 9,
|
|
76
|
-
/** @deprecated Use `PixelFormat.BC3` instead. */
|
|
77
|
-
DXT5 = 10
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* @deprecated Use `PixelFormat` instead.
|
|
81
|
-
*
|
|
82
|
-
* Render buffer depth format enumeration.
|
|
83
|
-
*/
|
|
84
|
-
export declare enum RenderBufferDepthFormat {
|
|
85
|
-
/** Render to depth buffer,engine will automatically select the supported precision. */
|
|
86
|
-
Depth = 26,
|
|
87
|
-
/** Render to stencil buffer. */
|
|
88
|
-
Stencil = 27,
|
|
89
|
-
/** Render to depth stencil buffer, engine will automatically select the supported precision. */
|
|
90
|
-
DepthStencil = 28,
|
|
91
|
-
/** Force 16-bit depth buffer. */
|
|
92
|
-
Depth16 = 29,
|
|
93
|
-
/** Force 24-bit depth buffer. */
|
|
94
|
-
Depth24 = 30,
|
|
95
|
-
/** Force 32-bit depth buffer. */
|
|
96
|
-
Depth32 = 31,
|
|
97
|
-
/** Force 16-bit depth + 8-bit stencil buffer. */
|
|
98
|
-
Depth24Stencil8 = 32,
|
|
99
|
-
/** Force 32-bit depth + 8-bit stencil buffer. */
|
|
100
|
-
Depth32Stencil8 = 33
|
|
101
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Camera } from "../Camera";
|
|
2
|
-
import { Engine } from "../Engine";
|
|
3
|
-
import { ShaderTagKey } from "../shader/ShaderTagKey";
|
|
4
|
-
import { RenderElement } from "./RenderElement";
|
|
5
|
-
export declare abstract class Basic2DBatcher {
|
|
6
|
-
protected static _disableBatchTag: ShaderTagKey;
|
|
7
|
-
/** The maximum number of vertex. */
|
|
8
|
-
static MAX_VERTEX_COUNT: number;
|
|
9
|
-
static _canUploadSameBuffer: boolean;
|
|
10
|
-
constructor(engine: Engine);
|
|
11
|
-
drawElement(element: RenderElement, camera: Camera): void;
|
|
12
|
-
flush(camera: Camera): void;
|
|
13
|
-
clear(): void;
|
|
14
|
-
destroy(): void;
|
|
15
|
-
private _drawSubElement;
|
|
16
|
-
private _createMesh;
|
|
17
|
-
private _updateData;
|
|
18
|
-
private _getSubMeshFromPool;
|
|
19
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { IPoolElement } from "./IPoolElement";
|
|
2
|
-
/**
|
|
3
|
-
* Class pool utils.
|
|
4
|
-
*/
|
|
5
|
-
export declare class ClassPool<T extends IPoolElement> {
|
|
6
|
-
private _elementPoolIndex;
|
|
7
|
-
private _elementPool;
|
|
8
|
-
private _type;
|
|
9
|
-
constructor(type: new () => T);
|
|
10
|
-
/**
|
|
11
|
-
* Get element from pool.
|
|
12
|
-
*/
|
|
13
|
-
getFromPool(): T;
|
|
14
|
-
/**
|
|
15
|
-
* Reset pool.
|
|
16
|
-
*/
|
|
17
|
-
resetPool(): void;
|
|
18
|
-
garbageCollection(): void;
|
|
19
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { SubMesh } from "../graphic";
|
|
2
|
-
import { Primitive } from "../graphic/Primitive";
|
|
3
|
-
import { Material } from "../material";
|
|
4
|
-
import { Renderer } from "../Renderer";
|
|
5
|
-
import { IPoolElement } from "./IPoolElement";
|
|
6
|
-
export declare class RenderData implements IPoolElement {
|
|
7
|
-
component: Renderer;
|
|
8
|
-
material: Material;
|
|
9
|
-
primitive: Primitive;
|
|
10
|
-
subPrimitive: SubMesh;
|
|
11
|
-
multiRenderData: boolean;
|
|
12
|
-
setX(component: Renderer, material: Material, primitive: Primitive, subPrimitive: SubMesh): void;
|
|
13
|
-
dispose(): void;
|
|
14
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Primitive, SubMesh } from "../graphic";
|
|
2
|
-
import { Material } from "../material/Material";
|
|
3
|
-
import { Renderer } from "../Renderer";
|
|
4
|
-
import { Texture2D } from "../texture";
|
|
5
|
-
import { IPoolElement } from "../utils/Pool";
|
|
6
|
-
import { Chunk } from "./DynamicGeometryData";
|
|
7
|
-
import { RenderData } from "./RenderData";
|
|
8
|
-
export declare class RenderData2D extends RenderData implements IPoolElement {
|
|
9
|
-
texture: Texture2D;
|
|
10
|
-
chunk: Chunk;
|
|
11
|
-
constructor();
|
|
12
|
-
set(component: Renderer, material: Material, primitive: Primitive, subPrimitive: SubMesh, texture?: Texture2D, chunk?: Chunk): void;
|
|
13
|
-
dispose(): void;
|
|
14
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { Color } from "@galacean/engine-math";
|
|
2
|
-
import { Camera } from "../Camera";
|
|
3
|
-
import { CameraClearFlags } from "../enums/CameraClearFlags";
|
|
4
|
-
import { Layer } from "../Layer";
|
|
5
|
-
import { Material } from "../material/Material";
|
|
6
|
-
import { RenderTarget } from "../texture/RenderTarget";
|
|
7
|
-
import { RenderQueue } from "./RenderQueue";
|
|
8
|
-
/**
|
|
9
|
-
* RenderPass.
|
|
10
|
-
*/
|
|
11
|
-
declare class RenderPass {
|
|
12
|
-
name: string;
|
|
13
|
-
enabled: boolean;
|
|
14
|
-
priority: number;
|
|
15
|
-
renderTarget: RenderTarget;
|
|
16
|
-
replaceMaterial: Material;
|
|
17
|
-
mask: Layer;
|
|
18
|
-
renderOverride: boolean;
|
|
19
|
-
clearFlags: CameraClearFlags | undefined;
|
|
20
|
-
clearColor: Color | undefined;
|
|
21
|
-
/**
|
|
22
|
-
* Create a RenderPass.
|
|
23
|
-
* @param name - Pass name
|
|
24
|
-
* @param priority - Priority, less than 0 before the default pass, greater than 0 after the default pass
|
|
25
|
-
* @param renderTarget - The specified Render Target
|
|
26
|
-
* @param replaceMaterial - Replaced material
|
|
27
|
-
* @param mask - Perform bit and operations with Entity.Layer to filter the objects that this Pass needs to render
|
|
28
|
-
*/
|
|
29
|
-
constructor(name?: string, priority?: number, renderTarget?: any, replaceMaterial?: any, mask?: any);
|
|
30
|
-
/**
|
|
31
|
-
* Rendering callback, will be executed if renderOverride is set to true.
|
|
32
|
-
* @param camera - Camera
|
|
33
|
-
* @param opaqueQueue - Opaque queue
|
|
34
|
-
* @param alphaTestQueue - Alpha test queue
|
|
35
|
-
* @param transparentQueue - Transparent queue
|
|
36
|
-
*/
|
|
37
|
-
render(camera: Camera, opaqueQueue: RenderQueue, alphaTestQueue: RenderQueue, transparentQueue: RenderQueue): void;
|
|
38
|
-
/**
|
|
39
|
-
* Post rendering callback.
|
|
40
|
-
* @param camera - Camera
|
|
41
|
-
* @param opaqueQueue - Opaque queue
|
|
42
|
-
* @param alphaTestQueue - Alpha test queue
|
|
43
|
-
* @param transparentQueue - Transparent queue
|
|
44
|
-
*/
|
|
45
|
-
preRender(camera: Camera, opaqueQueue: RenderQueue, alphaTestQueue: RenderQueue, transparentQueue: RenderQueue): void;
|
|
46
|
-
/**
|
|
47
|
-
* Post rendering callback.
|
|
48
|
-
* @param camera - Camera
|
|
49
|
-
* @param opaqueQueue - Opaque queue
|
|
50
|
-
* @param alphaTestQueue - Alpha test queue
|
|
51
|
-
* @param transparentQueue - Transparent queue
|
|
52
|
-
*/
|
|
53
|
-
postRender(camera: Camera, opaqueQueue: RenderQueue, alphaTestQueue: RenderQueue, transparentQueue: RenderQueue): void;
|
|
54
|
-
}
|
|
55
|
-
export { RenderPass };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Camera } from "../Camera";
|
|
2
|
-
import { VertexElement } from "../graphic/VertexElement";
|
|
3
|
-
import { Basic2DBatcher } from "./Basic2DBatcher";
|
|
4
|
-
import { RenderElement } from "./RenderElement";
|
|
5
|
-
import { SpriteMaskRenderData } from "./SpriteMaskRenderData";
|
|
6
|
-
export declare class SpriteMaskBatcher extends Basic2DBatcher {
|
|
7
|
-
createVertexElements(vertexElements: VertexElement[]): number;
|
|
8
|
-
canBatch(preElement: RenderElement, curElement: RenderElement): boolean;
|
|
9
|
-
updateVertices(element: SpriteMaskRenderData, vertices: Float32Array, vertexIndex: number): number;
|
|
10
|
-
drawBatches(camera: Camera): void;
|
|
11
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { VertexData2D } from "../2d/data/VertexData2D";
|
|
2
|
-
import { Material } from "../material/Material";
|
|
3
|
-
import { Renderer } from "../Renderer";
|
|
4
|
-
import { IPoolElement } from "./IPoolElement";
|
|
5
|
-
import { RenderData } from "./RenderData";
|
|
6
|
-
export declare class SpriteMaskRenderData extends RenderData implements IPoolElement {
|
|
7
|
-
isAdd: boolean;
|
|
8
|
-
verticesData: VertexData2D;
|
|
9
|
-
constructor();
|
|
10
|
-
set(component: Renderer, material: Material, verticesData: VertexData2D): void;
|
|
11
|
-
dispose(): void;
|
|
12
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { VertexData2D } from "../2d/data/VertexData2D";
|
|
2
|
-
import { Material } from "../material/Material";
|
|
3
|
-
import { Renderer } from "../Renderer";
|
|
4
|
-
import { Texture2D } from "../texture";
|
|
5
|
-
import { IPoolElement } from "./IPoolElement";
|
|
6
|
-
import { RenderData } from "./RenderData";
|
|
7
|
-
export declare class SpriteRenderData extends RenderData implements IPoolElement {
|
|
8
|
-
verticesData: VertexData2D;
|
|
9
|
-
texture: Texture2D;
|
|
10
|
-
dataIndex: number;
|
|
11
|
-
constructor();
|
|
12
|
-
set(component: Renderer, material: Material, verticesData: VertexData2D, texture: Texture2D, dataIndex?: number): void;
|
|
13
|
-
dispose(): void;
|
|
14
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { IPoolElement } from "./IPoolElement";
|
|
2
|
-
import { RenderData } from "./RenderData";
|
|
3
|
-
import { SpriteRenderData } from "./SpriteRenderData";
|
|
4
|
-
export declare class TextRenderData extends RenderData implements IPoolElement {
|
|
5
|
-
charsData: SpriteRenderData[];
|
|
6
|
-
constructor();
|
|
7
|
-
dispose(): void;
|
|
8
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Force upload shader data flag.
|
|
3
|
-
*/
|
|
4
|
-
export declare enum ForceUploadShaderDataFlag {
|
|
5
|
-
/** Upload nothing. */
|
|
6
|
-
None = 0,
|
|
7
|
-
/** Upload scene shader data. */
|
|
8
|
-
Scene = 1,
|
|
9
|
-
/** Upload camera shader data. */
|
|
10
|
-
Camera = 2,
|
|
11
|
-
/** Upload renderer shader data. */
|
|
12
|
-
Renderer = 4,
|
|
13
|
-
/** Upload material shader data. */
|
|
14
|
-
Material = 8
|
|
15
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This enum describes what should be done on the render target when the GPU is done rendering into it.
|
|
3
|
-
*/
|
|
4
|
-
export declare enum RenderBufferStoreAction {
|
|
5
|
-
/**
|
|
6
|
-
* Do nothing after rendering.
|
|
7
|
-
*/
|
|
8
|
-
DontCare = 0,
|
|
9
|
-
/**
|
|
10
|
-
* Blit the MSAA render target after rendering.
|
|
11
|
-
*/
|
|
12
|
-
BlitMSAA = 1
|
|
13
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { AnimatorState } from "./AnimatorState";
|
|
2
|
-
/**
|
|
3
|
-
* Transitions define when and how the state machine switch from on state to another. AnimatorTransition always originate from a StateMachine or a StateMachine entry.
|
|
4
|
-
*/
|
|
5
|
-
export declare class AnimatorStateTransition {
|
|
6
|
-
/** The duration of the transition. This is represented in normalized time. */
|
|
7
|
-
duration: number;
|
|
8
|
-
/** The time at which the destination state will start. This is represented in normalized time. */
|
|
9
|
-
offset: number;
|
|
10
|
-
/** ExitTime represents the exact time at which the transition can take effect. This is represented in normalized time. */
|
|
11
|
-
exitTime: number;
|
|
12
|
-
/** The destination state of the transition. */
|
|
13
|
-
destinationState: AnimatorState;
|
|
14
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { RenderContext } from "../RenderPipeline/RenderContext";
|
|
2
|
-
import { RenderTarget, Texture2D } from "../texture";
|
|
3
|
-
export declare abstract class PostProcessEffect {
|
|
4
|
-
readonly engine: any;
|
|
5
|
-
private _enabled;
|
|
6
|
-
/**
|
|
7
|
-
* Indicates whether the post process effect is enabled.
|
|
8
|
-
*/
|
|
9
|
-
get enabled(): boolean;
|
|
10
|
-
set enabled(value: boolean);
|
|
11
|
-
constructor(engine: any);
|
|
12
|
-
abstract onRender(context: RenderContext, srcTexture: Texture2D, destRenderTarget: RenderTarget): void;
|
|
13
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { Engine } from "../Engine";
|
|
2
|
-
import { PipelinePass } from "../RenderPipeline/PipelinePass";
|
|
3
|
-
import { RenderContext } from "../RenderPipeline/RenderContext";
|
|
4
|
-
import { PostProcessEffect } from "./PostProcessEffect";
|
|
5
|
-
export declare class PostProcessPass extends PipelinePass {
|
|
6
|
-
private _isActive;
|
|
7
|
-
private _effects;
|
|
8
|
-
/** The name of pass. */
|
|
9
|
-
name: string;
|
|
10
|
-
/**
|
|
11
|
-
* Whether to activate current post process.
|
|
12
|
-
*/
|
|
13
|
-
get isActive(): boolean;
|
|
14
|
-
set isActive(value: boolean);
|
|
15
|
-
/**
|
|
16
|
-
* Get the post process effect list.
|
|
17
|
-
*/
|
|
18
|
-
get effects(): ReadonlyArray<PostProcessEffect>;
|
|
19
|
-
/**
|
|
20
|
-
* Create a post process pass.
|
|
21
|
-
* @param engine - The engine the pass belongs to
|
|
22
|
-
* @param name - The pass name if need
|
|
23
|
-
*/
|
|
24
|
-
constructor(engine: Engine, name?: string);
|
|
25
|
-
onRender(context: RenderContext): void;
|
|
26
|
-
/**
|
|
27
|
-
* Get post process effect which match the type.
|
|
28
|
-
* @param type - The type of the post process effect
|
|
29
|
-
* @returns The first post process effect which match type
|
|
30
|
-
*/
|
|
31
|
-
getEffect(type: typeof PostProcessEffect): PostProcessEffect | null;
|
|
32
|
-
/**
|
|
33
|
-
* Get post process effects which match the type.
|
|
34
|
-
* @param type - The type of the post process effect
|
|
35
|
-
* @param results - The effects which match type
|
|
36
|
-
* @returns The effects which match type
|
|
37
|
-
*/
|
|
38
|
-
getEffects(type: typeof PostProcessEffect, results: PostProcessEffect[]): PostProcessEffect[];
|
|
39
|
-
/**
|
|
40
|
-
* Add post process effect.
|
|
41
|
-
* @param effect - The post process effect want to be added
|
|
42
|
-
*/
|
|
43
|
-
addEffect(effect: PostProcessEffect): void;
|
|
44
|
-
/**
|
|
45
|
-
* Add post process at specified index.
|
|
46
|
-
* @param indexOrEffect - Specified index
|
|
47
|
-
* @param effect - The post process effect want to be added
|
|
48
|
-
*/
|
|
49
|
-
addEffect(index: number, effect: PostProcessEffect): void;
|
|
50
|
-
/**
|
|
51
|
-
* Remove post process effect.
|
|
52
|
-
* @param effect - The post process effect want to be removed
|
|
53
|
-
*/
|
|
54
|
-
removeEffect(effect: PostProcessEffect): void;
|
|
55
|
-
}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Defines various pixel formats.
|
|
3
|
-
*/
|
|
4
|
-
export declare enum PixelFormat {
|
|
5
|
-
/** RGB format, 8 bits per channel. */
|
|
6
|
-
R8G8B8 = 0,
|
|
7
|
-
/** RGBA format, 8 bits per channel. */
|
|
8
|
-
R8G8B8A8 = 1,
|
|
9
|
-
/** RGBA format, 4 bits per channel. */
|
|
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. */
|
|
12
|
-
R5G5B5A1 = 3,
|
|
13
|
-
/** RGB format, 5 bits in R channel, 6 bits in G channel, 5 bits in B channel. */
|
|
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
|
-
/** RGBA format, 16 bits per channel. */
|
|
20
|
-
R16G16B16A16 = 7,
|
|
21
|
-
/** RGBA format, 32 bits per channel. */
|
|
22
|
-
R32G32B32A32 = 8,
|
|
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
|
-
/** Render to stencil buffer. */
|
|
60
|
-
Stencil = 27,
|
|
61
|
-
/** Automatic depth stencil format, engine will automatically select the supported precision. */
|
|
62
|
-
DepthStencil = 28,
|
|
63
|
-
/** 16-bit depth format. */
|
|
64
|
-
Depth16 = 29,
|
|
65
|
-
/** 24-bit depth format. */
|
|
66
|
-
Depth24 = 30,
|
|
67
|
-
/** 32-bit depth format. */
|
|
68
|
-
Depth32 = 31,
|
|
69
|
-
/** 16-bit depth + 8-bit stencil format. */
|
|
70
|
-
Depth24Stencil8 = 32,
|
|
71
|
-
/** 32-bit depth + 8-bit stencil format. */
|
|
72
|
-
Depth32Stencil8 = 33
|
|
73
|
-
}
|