@galacean/engine-core 1.6.0-alpha.0 → 1.6.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 +4250 -3892
- package/dist/main.js.map +1 -1
- package/dist/module.js +4249 -3893
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
- package/types/RenderPipeline/BasicRenderPipeline.d.ts +1 -0
- package/types/Scene.d.ts +8 -1
- package/types/Transform.d.ts +5 -3
- package/types/lighting/ambientOcclusion/AmbientOcclusion.d.ts +79 -0
- package/types/lighting/ambientOcclusion/ScalableAmbientObscurancePass.d.ts +1 -0
- package/types/lighting/ambientOcclusion/index.d.ts +2 -0
- package/types/lighting/enums/AmbientOcclusionQuality.d.ts +11 -0
- package/types/lighting/index.d.ts +1 -0
- package/types/shaderlib/ShaderLib.d.ts +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/engine-core",
|
|
3
|
-
"version": "1.6.0-alpha.
|
|
3
|
+
"version": "1.6.0-alpha.2",
|
|
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.6.0-alpha.
|
|
21
|
+
"@galacean/engine-math": "1.6.0-alpha.2"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@galacean/engine-design": "1.6.0-alpha.
|
|
24
|
+
"@galacean/engine-design": "1.6.0-alpha.2"
|
|
25
25
|
},
|
|
26
26
|
"scripts": {
|
|
27
27
|
"b:types": "tsc"
|
package/types/Scene.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { Engine } from "./Engine";
|
|
|
4
4
|
import { Entity } from "./Entity";
|
|
5
5
|
import { EngineObject } from "./base";
|
|
6
6
|
import { FogMode } from "./enums/FogMode";
|
|
7
|
-
import { DirectLight } from "./lighting";
|
|
7
|
+
import { AmbientOcclusion, DirectLight } from "./lighting";
|
|
8
8
|
import { AmbientLight } from "./lighting/AmbientLight";
|
|
9
9
|
import { PhysicsScene } from "./physics/PhysicsScene";
|
|
10
10
|
import { PostProcessManager } from "./postProcess";
|
|
@@ -39,6 +39,13 @@ export declare class Scene extends EngineObject {
|
|
|
39
39
|
shadowFadeBorder: number;
|
|
40
40
|
/** Post process manager. */
|
|
41
41
|
readonly postProcessManager: PostProcessManager;
|
|
42
|
+
/**
|
|
43
|
+
* Ambient Occlusion settings.
|
|
44
|
+
* @remarks
|
|
45
|
+
* Darkens areas where objects are close together to simulate natural light blocking,
|
|
46
|
+
* such as corners, crevices, and contact points between surfaces.
|
|
47
|
+
*/
|
|
48
|
+
readonly ambientOcclusion: AmbientOcclusion;
|
|
42
49
|
private _background;
|
|
43
50
|
private _shaderData;
|
|
44
51
|
private _shadowCascades;
|
package/types/Transform.d.ts
CHANGED
|
@@ -192,8 +192,8 @@ export declare class Transform extends Component {
|
|
|
192
192
|
* @param worldUp - Up direction in world space, default is Vector3(0, 1, 0)
|
|
193
193
|
*/
|
|
194
194
|
lookAt(targetPosition: Vector3, worldUp?: Vector3): void;
|
|
195
|
-
protected _onLocalMatrixChanging
|
|
196
|
-
protected
|
|
195
|
+
protected _onLocalMatrixChanging(): void;
|
|
196
|
+
protected _onWorldMatrixChanging(): void;
|
|
197
197
|
protected _isContainDirtyFlags(targetDirtyFlags: number): boolean;
|
|
198
198
|
protected _isContainDirtyFlag(type: number): boolean;
|
|
199
199
|
protected _setDirtyFlagTrue(type: number): void;
|
|
@@ -298,5 +298,7 @@ export declare enum TransformModifyFlags {
|
|
|
298
298
|
/** WorldMatrix | WorldPosition | WorldEuler | WorldQuat | WorldScale */
|
|
299
299
|
WmWpWeWqWs = 188,
|
|
300
300
|
/** WorldMatrix | WorldPosition | WorldEuler | WorldQuat | WorldScale | WorldUniformScaling */
|
|
301
|
-
WmWpWeWqWsWus = 444
|
|
301
|
+
WmWpWeWqWsWus = 444,
|
|
302
|
+
/** LocalQuat | LocalMatrix | WorldMatrix | WorldPosition | WorldEuler | WorldQuat | WorldScale | WorldUniformScaling */
|
|
303
|
+
LqLmWmWpWeWqWsWus = 510
|
|
302
304
|
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { Scene } from "../../Scene";
|
|
2
|
+
import { AmbientOcclusionQuality } from "../enums/AmbientOcclusionQuality";
|
|
3
|
+
/**
|
|
4
|
+
* Ambient Occlusion settings.
|
|
5
|
+
* @remarks
|
|
6
|
+
* Adds realistic shadows to corners, crevices, and areas where objects meet.
|
|
7
|
+
*/
|
|
8
|
+
export declare class AmbientOcclusion {
|
|
9
|
+
private static _enableMacro;
|
|
10
|
+
/**
|
|
11
|
+
* Controls the quality of the ambient occlusion effect.
|
|
12
|
+
* @remarks
|
|
13
|
+
* If set to `AmbientOcclusionQuality.Low`, the effect will use fewer samples for faster performance.
|
|
14
|
+
* If set to `AmbientOcclusionQuality.Medium`, the effect will balance quality and performance.
|
|
15
|
+
* If set to `AmbientOcclusionQuality.High`, the effect will use more samples for better quality, but the performance will be worse.
|
|
16
|
+
*/
|
|
17
|
+
quality: AmbientOcclusionQuality;
|
|
18
|
+
private _scene;
|
|
19
|
+
private _enabled;
|
|
20
|
+
private _power;
|
|
21
|
+
private _bilateralThreshold;
|
|
22
|
+
private _radius;
|
|
23
|
+
private _intensity;
|
|
24
|
+
private _bias;
|
|
25
|
+
private _minHorizonAngle;
|
|
26
|
+
/**
|
|
27
|
+
* Control whether ambient occlusion is enabled or not.
|
|
28
|
+
*/
|
|
29
|
+
get enabled(): boolean;
|
|
30
|
+
set enabled(value: boolean);
|
|
31
|
+
/**
|
|
32
|
+
* Controls the radius of the ambient occlusion effect.
|
|
33
|
+
* Higher values create larger occlusion areas.
|
|
34
|
+
* Valid range: [0.1, 10.0]
|
|
35
|
+
* @defaultValue 0.3
|
|
36
|
+
*/
|
|
37
|
+
get radius(): number;
|
|
38
|
+
set radius(value: number);
|
|
39
|
+
/**
|
|
40
|
+
* Controls the strength of the ambient occlusion effect.
|
|
41
|
+
* Valid range: [0.0, Infinity)
|
|
42
|
+
* @defaultValue 1.0
|
|
43
|
+
*/
|
|
44
|
+
get intensity(): number;
|
|
45
|
+
set intensity(value: number);
|
|
46
|
+
/**
|
|
47
|
+
* Control the contrast of the ambient occlusion effect.
|
|
48
|
+
* The larger the value, the grayer the effect.
|
|
49
|
+
* Valid range: [1.0, 8.0]
|
|
50
|
+
* @defaultValue 1.0
|
|
51
|
+
*/
|
|
52
|
+
get power(): number;
|
|
53
|
+
set power(value: number);
|
|
54
|
+
/**
|
|
55
|
+
* Control the threshold for blurred edges.
|
|
56
|
+
* Smaller value that retains the edge will result in sharper edges,
|
|
57
|
+
* while a larger value will make the edges softer.
|
|
58
|
+
* Valid range: [0.000001, 0.1]
|
|
59
|
+
* @defaultValue 0.05
|
|
60
|
+
*/
|
|
61
|
+
get bilateralThreshold(): number;
|
|
62
|
+
set bilateralThreshold(value: number);
|
|
63
|
+
/**
|
|
64
|
+
* Controls the bias to prevent self-occlusion artifacts.
|
|
65
|
+
* Valid range: [0.0, 0.5]
|
|
66
|
+
* @defaultValue 0.0005
|
|
67
|
+
*/
|
|
68
|
+
get bias(): number;
|
|
69
|
+
set bias(value: number);
|
|
70
|
+
/**
|
|
71
|
+
* Controls the minimum horizon angle to reduce artifacts from low-tessellation geometry.
|
|
72
|
+
* Valid range: [0.0, π/4] (0 to 45 degrees in radians)
|
|
73
|
+
* @defaultValue 0.0
|
|
74
|
+
*/
|
|
75
|
+
get minHorizonAngle(): number;
|
|
76
|
+
set minHorizonAngle(value: number);
|
|
77
|
+
constructor(scene: Scene);
|
|
78
|
+
private _toggleAmbientOcclusionMacro;
|
|
79
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ambient occlusion quality levels that control the balance between visual quality and performance.
|
|
3
|
+
*/
|
|
4
|
+
export declare enum AmbientOcclusionQuality {
|
|
5
|
+
/** Low quality - fewer samples, better performance. */
|
|
6
|
+
Low = 0,
|
|
7
|
+
/** Medium quality - balanced samples and performance. */
|
|
8
|
+
Medium = 1,
|
|
9
|
+
/** High quality - more samples, slower performance. */
|
|
10
|
+
High = 2
|
|
11
|
+
}
|
|
@@ -35,6 +35,7 @@ export declare const ShaderLib: {
|
|
|
35
35
|
worldpos_share: string;
|
|
36
36
|
FogVertexDeclaration: string;
|
|
37
37
|
FogFragmentDeclaration: string;
|
|
38
|
+
PositionClipSpaceDeclaration: string;
|
|
38
39
|
begin_normal_vert: string;
|
|
39
40
|
begin_position_vert: string;
|
|
40
41
|
position_vert: string;
|
|
@@ -49,6 +50,7 @@ export declare const ShaderLib: {
|
|
|
49
50
|
light_frag_define: string;
|
|
50
51
|
mobile_material_frag: string;
|
|
51
52
|
FogFragment: string;
|
|
53
|
+
PositionClipSpaceVertex: string;
|
|
52
54
|
begin_mobile_frag: string;
|
|
53
55
|
begin_viewdir_frag: string;
|
|
54
56
|
mobile_blinnphong_frag: string;
|