@galacean/engine-core 1.4.0-alpha.3 → 1.4.0-beta.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.
- package/dist/main.js +7589 -7108
- package/dist/main.js.map +1 -1
- package/dist/module.js +7551 -7090
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
- package/types/2d/assembler/ISpriteAssembler.d.ts +11 -1
- package/types/2d/assembler/ISpriteRenderer.d.ts +16 -0
- package/types/2d/assembler/SimpleSpriteAssembler.d.ts +13 -1
- package/types/2d/assembler/SlicedSpriteAssembler.d.ts +15 -1
- package/types/2d/assembler/TiledSpriteAssembler.d.ts +17 -1
- package/types/2d/enums/SpriteModifyFlags.d.ts +9 -0
- package/types/2d/index.d.ts +11 -4
- package/types/2d/sprite/Sprite.d.ts +2 -2
- package/types/2d/sprite/SpriteMask.d.ts +2 -1
- package/types/2d/sprite/SpriteRenderer.d.ts +2 -1
- package/types/2d/sprite/index.d.ts +1 -1
- package/types/2d/text/ITextRenderer.d.ts +8 -0
- package/types/2d/text/TextRenderer.d.ts +5 -1
- package/types/2d/text/index.d.ts +2 -0
- package/types/Camera.d.ts +2 -0
- package/types/ComponentsManager.d.ts +4 -0
- package/types/Entity.d.ts +2 -0
- package/types/RenderPipeline/index.d.ts +3 -2
- package/types/Renderer.d.ts +15 -1
- package/types/Scene.d.ts +1 -0
- package/types/Script.d.ts +42 -18
- package/types/enums/CameraModifyFlags.d.ts +17 -0
- package/types/enums/EntityModifyFlags.d.ts +9 -0
- package/types/index.d.ts +3 -1
- package/types/input/index.d.ts +5 -2
- package/types/input/pointer/Pointer.d.ts +8 -2
- package/types/input/pointer/PointerEventData.d.ts +12 -0
- package/types/input/pointer/PointerManager.d.ts +9 -1
- package/types/input/pointer/emitter/IHitResult.d.ts +1 -0
- package/types/input/pointer/emitter/PhysicsPointerEventEmitter.d.ts +1 -0
- package/types/input/pointer/emitter/PointerEventEmitter.d.ts +30 -0
- package/types/material/utils/PrefilteredDFG.d.ts +7 -0
- package/types/physics/HitResult.d.ts +1 -1
- package/types/postProcess/PostProcess.d.ts +4 -0
- package/types/postProcess/PostProcessEffectParameter.d.ts +103 -9
- package/types/postProcess/effects/BloomEffect.d.ts +9 -11
- package/types/postProcess/effects/TonemappingEffect.d.ts +2 -2
- package/types/postProcess/index.d.ts +1 -1
- package/types/shader/index.d.ts +1 -0
- package/types/ui/IUICanvas.d.ts +1 -0
- package/types/ui/UIUtils.d.ts +9 -0
|
@@ -1,25 +1,119 @@
|
|
|
1
1
|
import { Color, Vector2, Vector3, Vector4 } from "@galacean/engine-math";
|
|
2
|
-
import { Texture } from "../texture
|
|
2
|
+
import { Texture } from "../texture";
|
|
3
3
|
/**
|
|
4
4
|
* Represents a parameter of a post process effect.
|
|
5
5
|
* @remarks
|
|
6
6
|
* The parameter will be mixed to a final value and be used in post process manager.
|
|
7
7
|
*/
|
|
8
|
-
export declare class PostProcessEffectParameter<T
|
|
8
|
+
export declare abstract class PostProcessEffectParameter<T> {
|
|
9
9
|
/**
|
|
10
10
|
* Whether the parameter is enabled.
|
|
11
11
|
*/
|
|
12
12
|
enabled: boolean;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
private _min?;
|
|
16
|
-
private _max?;
|
|
13
|
+
protected _needLerp: boolean;
|
|
14
|
+
protected _value: T;
|
|
17
15
|
/**
|
|
18
16
|
* The value of the parameter.
|
|
19
17
|
*/
|
|
20
18
|
get value(): T;
|
|
21
19
|
set value(value: T);
|
|
22
|
-
constructor(value:
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
constructor(value: T, needLerp?: boolean);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Represents a float parameter of a post process effect.
|
|
24
|
+
*/
|
|
25
|
+
export declare class PostProcessEffectFloatParameter extends PostProcessEffectParameter<number> {
|
|
26
|
+
readonly min: number;
|
|
27
|
+
readonly max: number;
|
|
28
|
+
get value(): number;
|
|
29
|
+
set value(v: number);
|
|
30
|
+
/**
|
|
31
|
+
* Create a new float parameter.
|
|
32
|
+
* @param value - The default value of the parameter
|
|
33
|
+
* @param _min - The minimum value of the parameter, default is Number.NEGATIVE_INFINITY
|
|
34
|
+
* @param _max - The maximum value of the parameter, default is Number.POSITIVE_INFINITY
|
|
35
|
+
* @param needLerp - Whether the parameter needs to be lerp, default is true
|
|
36
|
+
*/
|
|
37
|
+
constructor(value: number, min?: number, max?: number, needLerp?: boolean);
|
|
38
|
+
_lerp(to: number, factor: number): void;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Represents a boolean parameter of a post process effect.
|
|
42
|
+
*/
|
|
43
|
+
export declare class PostProcessEffectBoolParameter extends PostProcessEffectParameter<boolean> {
|
|
44
|
+
/**
|
|
45
|
+
* Create a new boolean parameter.
|
|
46
|
+
* @param value - The default value of the parameter
|
|
47
|
+
*/
|
|
48
|
+
constructor(value: boolean);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Represents a texture parameter of a post process effect.
|
|
52
|
+
*/
|
|
53
|
+
export declare class PostProcessEffectTextureParameter extends PostProcessEffectParameter<Texture> {
|
|
54
|
+
/**
|
|
55
|
+
* Create a new texture parameter.
|
|
56
|
+
* @param value - The default texture of the parameter
|
|
57
|
+
*/
|
|
58
|
+
constructor(value: Texture);
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Represents a color parameter of a post process effect.
|
|
62
|
+
*/
|
|
63
|
+
export declare class PostProcessEffectColorParameter extends PostProcessEffectParameter<Color> {
|
|
64
|
+
/**
|
|
65
|
+
* Create a new color parameter.
|
|
66
|
+
* @param value - The default color of the parameter
|
|
67
|
+
* @param needLerp - Whether the parameter needs to be lerp, default is true
|
|
68
|
+
*/
|
|
69
|
+
constructor(value: Color, needLerp?: boolean);
|
|
70
|
+
_lerp(to: Color, factor: number): void;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Represents a vector2 parameter of a post process effect.
|
|
74
|
+
*/
|
|
75
|
+
export declare class PostProcessEffectVector2Parameter extends PostProcessEffectParameter<Vector2> {
|
|
76
|
+
/**
|
|
77
|
+
* Create a new vector2 parameter.
|
|
78
|
+
* @param value - The default vector2 of the parameter
|
|
79
|
+
* @param needLerp - Whether the parameter needs to be lerp, default is true
|
|
80
|
+
*/
|
|
81
|
+
constructor(value: Vector2, needLerp?: boolean);
|
|
82
|
+
_lerp(to: Vector2, factor: number): void;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Represents a vector3 parameter of a post process effect.
|
|
86
|
+
*/
|
|
87
|
+
export declare class PostProcessEffectVector3Parameter extends PostProcessEffectParameter<Vector3> {
|
|
88
|
+
/**
|
|
89
|
+
* Create a new vector3 parameter.
|
|
90
|
+
* @param value - The default vector3 of the parameter
|
|
91
|
+
* @param needLerp - Whether the parameter needs to be lerp, default is true
|
|
92
|
+
*/
|
|
93
|
+
constructor(value: Vector3, needLerp?: boolean);
|
|
94
|
+
_lerp(to: Vector3, factor: number): void;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Represents a vector4 parameter of a post process effect.
|
|
98
|
+
*/
|
|
99
|
+
export declare class PostProcessEffectVector4Parameter extends PostProcessEffectParameter<Vector4> {
|
|
100
|
+
/**
|
|
101
|
+
* Create a new vector4 parameter.
|
|
102
|
+
* @param value - The default vector4 of the parameter
|
|
103
|
+
* @param needLerp - Whether the parameter needs to be lerp, default is true
|
|
104
|
+
*/
|
|
105
|
+
constructor(value: Vector4, needLerp?: boolean);
|
|
106
|
+
_lerp(to: Vector4, factor: number): void;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Represents a enum parameter of a post process effect.
|
|
110
|
+
*/
|
|
111
|
+
export declare class PostProcessEffectEnumParameter<T> extends PostProcessEffectParameter<T> {
|
|
112
|
+
readonly enumType: Record<string, number | string>;
|
|
113
|
+
/**
|
|
114
|
+
* Create a new enum parameter.
|
|
115
|
+
* @param enumType - The type of the enum
|
|
116
|
+
* @param value - The default enum value of the parameter
|
|
117
|
+
*/
|
|
118
|
+
constructor(enumType: Record<string, number | string>, value: T);
|
|
25
119
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { Color } from "@galacean/engine-math";
|
|
2
|
-
import { Texture2D } from "../../texture";
|
|
3
1
|
import { PostProcessEffect } from "../PostProcessEffect";
|
|
4
|
-
import {
|
|
2
|
+
import { PostProcessEffectBoolParameter, PostProcessEffectColorParameter, PostProcessEffectEnumParameter, PostProcessEffectFloatParameter, PostProcessEffectTextureParameter } from "../PostProcessEffectParameter";
|
|
5
3
|
/**
|
|
6
4
|
* This controls the size of the bloom texture.
|
|
7
5
|
*/
|
|
@@ -17,36 +15,36 @@ export declare class BloomEffect extends PostProcessEffect {
|
|
|
17
15
|
* Controls whether to use bicubic sampling instead of bilinear sampling for the upSampling passes.
|
|
18
16
|
* @remarks This is slightly more expensive but helps getting smoother visuals.
|
|
19
17
|
*/
|
|
20
|
-
highQualityFiltering:
|
|
18
|
+
highQualityFiltering: PostProcessEffectBoolParameter;
|
|
21
19
|
/**
|
|
22
20
|
* Controls the starting resolution that this effect begins processing.
|
|
23
21
|
*/
|
|
24
|
-
downScale:
|
|
22
|
+
downScale: PostProcessEffectEnumParameter<BloomDownScaleMode>;
|
|
25
23
|
/**
|
|
26
24
|
* Specifies a Texture to add smudges or dust to the bloom effect.
|
|
27
25
|
*/
|
|
28
|
-
dirtTexture:
|
|
26
|
+
dirtTexture: PostProcessEffectTextureParameter;
|
|
29
27
|
/**
|
|
30
28
|
* Set the level of brightness to filter out pixels under this level.
|
|
31
29
|
* @remarks This value is expressed in gamma-space.
|
|
32
30
|
*/
|
|
33
|
-
threshold:
|
|
31
|
+
threshold: PostProcessEffectFloatParameter;
|
|
34
32
|
/**
|
|
35
33
|
* Controls the radius of the bloom effect.
|
|
36
34
|
*/
|
|
37
|
-
scatter:
|
|
35
|
+
scatter: PostProcessEffectFloatParameter;
|
|
38
36
|
/**
|
|
39
37
|
* Controls the strength of the bloom effect.
|
|
40
38
|
*/
|
|
41
|
-
intensity:
|
|
39
|
+
intensity: PostProcessEffectFloatParameter;
|
|
42
40
|
/**
|
|
43
41
|
* Controls the strength of the lens dirt.
|
|
44
42
|
*/
|
|
45
|
-
dirtIntensity:
|
|
43
|
+
dirtIntensity: PostProcessEffectFloatParameter;
|
|
46
44
|
/**
|
|
47
45
|
* Specifies the tint of the bloom effect.
|
|
48
46
|
*/
|
|
49
|
-
tint:
|
|
47
|
+
tint: PostProcessEffectColorParameter;
|
|
50
48
|
/** @inheritdoc */
|
|
51
49
|
isValid(): boolean;
|
|
52
50
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PostProcessEffect } from "../PostProcessEffect";
|
|
2
|
-
import {
|
|
2
|
+
import { PostProcessEffectEnumParameter } from "../PostProcessEffectParameter";
|
|
3
3
|
/**
|
|
4
4
|
* Options to select a tonemapping algorithm to use.
|
|
5
5
|
*/
|
|
@@ -21,5 +21,5 @@ export declare class TonemappingEffect extends PostProcessEffect {
|
|
|
21
21
|
/**
|
|
22
22
|
* Use this to select a tonemapping algorithm to use.
|
|
23
23
|
*/
|
|
24
|
-
mode:
|
|
24
|
+
mode: PostProcessEffectEnumParameter<TonemappingMode>;
|
|
25
25
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * from "./effects";
|
|
2
2
|
export { PostProcess } from "./PostProcess";
|
|
3
3
|
export { PostProcessEffect } from "./PostProcessEffect";
|
|
4
|
-
export { PostProcessEffectParameter } from "./PostProcessEffectParameter";
|
|
4
|
+
export { PostProcessEffectBoolParameter, PostProcessEffectColorParameter, PostProcessEffectEnumParameter, PostProcessEffectFloatParameter, PostProcessEffectParameter, PostProcessEffectTextureParameter, PostProcessEffectVector2Parameter, PostProcessEffectVector3Parameter, PostProcessEffectVector4Parameter } from "./PostProcessEffectParameter";
|
|
5
5
|
export { PostProcessManager } from "./PostProcessManager";
|
|
6
6
|
export { PostProcessPass, PostProcessPassEvent } from "./PostProcessPass";
|
|
7
7
|
export { PostProcessUberPass } from "./PostProcessUberPass";
|
package/types/shader/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export { CompareFunction } from "./enums/CompareFunction";
|
|
|
5
5
|
export { CullMode } from "./enums/CullMode";
|
|
6
6
|
export { RenderStateElementKey as RenderStateDataKey } from "./enums/RenderStateElementKey";
|
|
7
7
|
export { RenderQueueType } from "./enums/RenderQueueType";
|
|
8
|
+
export { ShaderDataGroup } from "./enums/ShaderDataGroup";
|
|
8
9
|
export { ShaderPropertyType } from "./enums/ShaderPropertyType";
|
|
9
10
|
export { StencilOperation } from "./enums/StencilOperation";
|
|
10
11
|
export { ShaderPlatformTarget } from "./enums/ShaderPlatformTarget";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Engine } from "../Engine";
|
|
2
|
+
import { DisorderedArray } from "../utils/DisorderedArray";
|
|
3
|
+
import { IUICanvas } from "./IUICanvas";
|
|
4
|
+
export declare class UIUtils {
|
|
5
|
+
private static _renderQueue;
|
|
6
|
+
private static _virtualCamera;
|
|
7
|
+
private static _viewport;
|
|
8
|
+
static renderOverlay(engine: Engine, uiCanvases: DisorderedArray<IUICanvas>): void;
|
|
9
|
+
}
|