@galacean/engine-core 1.5.0-alpha.0 → 1.5.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@galacean/engine-core",
3
- "version": "1.5.0-alpha.0",
3
+ "version": "1.5.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.5.0-alpha.0"
21
+ "@galacean/engine-math": "1.5.0-alpha.2"
22
22
  },
23
23
  "devDependencies": {
24
- "@galacean/engine-design": "1.5.0-alpha.0"
24
+ "@galacean/engine-design": "1.5.0-alpha.2"
25
25
  },
26
26
  "scripts": {
27
27
  "b:types": "tsc"
@@ -24,7 +24,7 @@ export declare class Background {
24
24
  private _texture;
25
25
  /**
26
26
  * Background solid color.
27
- * @defaultValue `new Color(0.25, 0.25, 0.25, 1.0)`
27
+ * @defaultValue `new Color(0.05, 0.05, 0.05, 1.0)`
28
28
  * @remarks When `mode` is `BackgroundMode.SolidColor`, the property will take effects.
29
29
  */
30
30
  get solidColor(): Color;
package/types/Camera.d.ts CHANGED
@@ -53,16 +53,23 @@ export declare class Camera extends Component {
53
53
  */
54
54
  opaqueTextureDownsampling: Downsampling;
55
55
  /**
56
- * Multi-sample anti-aliasing samples when use independent canvas mode.
56
+ * The screen-space anti-aliasing mode applied after the camera renders the final image.
57
+ * Unlike MSAA, it can smooth all pixels, including by shader-generated specular, alpha-cutoff edge, low resolution texture.
57
58
  *
58
- * @remarks It will take effect when `independentCanvasEnabled` property is `true`, otherwise it will be invalid.
59
- */
60
- msaaSamples: MSAASamples;
61
- /**
62
- * Anti-aliasing mode.
63
59
  * @defaultValue `AntiAliasing.None`
64
60
  */
65
61
  antiAliasing: AntiAliasing;
62
+ /**
63
+ * Determines whether to preserve the alpha channel in the output.
64
+ * When set to true, the alpha channel is always preserved.
65
+ * When set to false, the engine automatically decides whether to preserve it.
66
+ *
67
+ * @remarks
68
+ * Set to true if you need to ensure the alpha channel is preserved, for example, when performing canvas transparent blending.
69
+ *
70
+ * @defaultValue `false`
71
+ */
72
+ isAlphaOutputRequired: boolean;
66
73
  private _priority;
67
74
  private _shaderData;
68
75
  private _isCustomViewMatrix;
@@ -77,6 +84,7 @@ export declare class Camera extends Component {
77
84
  private _opaqueTextureEnabled;
78
85
  private _enableHDR;
79
86
  private _enablePostProcess;
87
+ private _msaaSamples;
80
88
  private _updateFlagManager;
81
89
  private _frustumChangeFlag;
82
90
  private _isViewMatrixDirty;
@@ -90,15 +98,9 @@ export declare class Camera extends Component {
90
98
  * If enabled, the opaque texture can be accessed in the shader using `camera_OpaqueTexture`.
91
99
  *
92
100
  * @defaultValue `false`
93
- * @remarks If enabled, the `independentCanvasEnabled` property will be forced to be true.
94
101
  */
95
102
  get opaqueTextureEnabled(): boolean;
96
103
  set opaqueTextureEnabled(value: boolean);
97
- /**
98
- * Whether independent canvas is enabled.
99
- * @remarks If true, the msaa in viewport can turn or off independently by `msaaSamples` property.
100
- */
101
- get independentCanvasEnabled(): boolean;
102
104
  /**
103
105
  * Shader data.
104
106
  */
@@ -165,14 +167,12 @@ export declare class Camera extends Component {
165
167
  /**
166
168
  * Whether to enable HDR.
167
169
  * @defaultValue `false`
168
- * @remarks If enabled, the `independentCanvasEnabled` property will be forced to be true.
169
170
  */
170
171
  get enableHDR(): boolean;
171
172
  set enableHDR(value: boolean);
172
173
  /**
173
174
  * Whether to enable post process.
174
175
  * @defaultValue `false`
175
- * @remarks If enabled, the `independentCanvasEnabled` property will be forced to be true.
176
176
  */
177
177
  get enablePostProcess(): boolean;
178
178
  set enablePostProcess(value: boolean);
@@ -181,6 +181,14 @@ export declare class Camera extends Component {
181
181
  */
182
182
  get renderTarget(): RenderTarget | null;
183
183
  set renderTarget(value: RenderTarget | null);
184
+ /**
185
+ * The number of samples used for hardware multisample anti-aliasing (MSAA) to smooth geometry edges during rasterization.
186
+ * Higher sample counts (e.g., 2x, 4x, 8x) produce smoother edges.
187
+ *
188
+ * @defaultValue `MSAASamples.FourX`
189
+ */
190
+ get msaaSamples(): MSAASamples;
191
+ set msaaSamples(value: MSAASamples);
184
192
  /**
185
193
  * Restore the view matrix to the world matrix of the entity.
186
194
  */
@@ -308,6 +316,5 @@ export declare class Camera extends Component {
308
316
  */
309
317
  private _getInverseProjectionMatrix;
310
318
  private _onPixelViewportChanged;
311
- private _checkMainCanvasAntialiasWaste;
312
319
  private _dispatchModify;
313
320
  }
@@ -1,8 +1,8 @@
1
1
  import { Color, SphericalHarmonics3 } from "@galacean/engine-math";
2
- import { TextureCube } from "../texture";
3
- import { DiffuseMode } from "./enums/DiffuseMode";
4
2
  import { ReferResource } from "../asset/ReferResource";
5
3
  import { Engine } from "../Engine";
4
+ import { TextureCube } from "../texture";
5
+ import { DiffuseMode } from "./enums/DiffuseMode";
6
6
  /**
7
7
  * Ambient light.
8
8
  */
@@ -6,8 +6,6 @@ import { ShadowType } from "../shadow";
6
6
  * Light base class.
7
7
  */
8
8
  export declare abstract class Light extends Component {
9
- /** Light Intensity */
10
- intensity: number;
11
9
  /**
12
10
  * Culling mask - which layers the light affect.
13
11
  * @remarks Support bit manipulation, corresponding to `Layer`.
@@ -16,6 +16,16 @@ export declare class ParticleMaterial extends BaseMaterial {
16
16
  */
17
17
  get baseTexture(): Texture2D;
18
18
  set baseTexture(value: Texture2D);
19
+ /**
20
+ * Emissive color.
21
+ */
22
+ get emissiveColor(): Color;
23
+ set emissiveColor(value: Color);
24
+ /**
25
+ * Emissive texture.
26
+ */
27
+ get emissiveTexture(): Texture2D;
28
+ set emissiveTexture(value: Texture2D);
19
29
  /**
20
30
  * Create a unlit material instance.
21
31
  * @param engine - Engine to which the material belongs
@@ -1,7 +1,8 @@
1
1
  import { BoolUpdateFlag } from "../BoolUpdateFlag";
2
+ import { ICustomClone } from "../clone/ComponentCloner";
2
3
  import { Component } from "../Component";
4
+ import { Layer } from "../Layer";
3
5
  import { ColliderShape } from "./shape/ColliderShape";
4
- import { ICustomClone } from "../clone/ComponentCloner";
5
6
  /**
6
7
  * Base class for all colliders.
7
8
  * @decorator `@dependentComponents(Transform, DependentMode.CheckOnly)`
@@ -9,10 +10,18 @@ import { ICustomClone } from "../clone/ComponentCloner";
9
10
  export declare class Collider extends Component implements ICustomClone {
10
11
  protected _updateFlag: BoolUpdateFlag;
11
12
  protected _shapes: ColliderShape[];
13
+ protected _collisionLayerIndex: number;
12
14
  /**
13
15
  * The shapes of this collider.
14
16
  */
15
17
  get shapes(): Readonly<ColliderShape[]>;
18
+ /**
19
+ * The collision layer of this collider, only support single layer.
20
+ *
21
+ * @defaultValue `Layer.Layer0`
22
+ */
23
+ get collisionLayer(): Layer;
24
+ set collisionLayer(value: Layer);
16
25
  /**
17
26
  * Add collider shape on this collider.
18
27
  * @param shape - Collider shape
@@ -30,4 +39,5 @@ export declare class Collider extends Component implements ICustomClone {
30
39
  protected _syncNative(): void;
31
40
  protected _addNativeShape(shape: ColliderShape): void;
32
41
  protected _removeNativeShape(shape: ColliderShape): void;
42
+ private _setCollisionLayer;
33
43
  }
@@ -30,6 +30,20 @@ export declare class PhysicsScene {
30
30
  get fixedTimeStep(): number;
31
31
  set fixedTimeStep(value: number);
32
32
  constructor(scene: Scene);
33
+ /**
34
+ * Get whether two colliders can collide with each other.
35
+ * @param layer1 - The first collision layer
36
+ * @param layer2 - The second collision layer
37
+ * @returns Whether the colliders should collide
38
+ */
39
+ getColliderLayerCollision(layer1: Layer, layer2: Layer): boolean;
40
+ /**
41
+ * Set whether two colliders can collide with each other.
42
+ * @param layer1 - The first collision layer
43
+ * @param layer2 - The second collision layer
44
+ * @param isCollide - Whether the colliders should collide
45
+ */
46
+ setColliderLayerCollision(layer1: Layer, layer2: Layer, isCollide: boolean): void;
33
47
  /**
34
48
  * Casts a ray through the Scene and returns the first hit.
35
49
  * @param ray - The ray
@@ -0,0 +1 @@
1
+ export {};
@@ -23,6 +23,7 @@ export declare abstract class ColliderShape implements ICustomClone {
23
23
  get id(): number;
24
24
  /**
25
25
  * Contact offset for this shape, the value must be greater than or equal to 0.
26
+ * @defaultValue 0.02
26
27
  */
27
28
  get contactOffset(): number;
28
29
  set contactOffset(value: number);
@@ -26,7 +26,7 @@ export declare class BloomEffect extends PostProcessEffect {
26
26
  dirtTexture: PostProcessEffectTextureParameter;
27
27
  /**
28
28
  * Set the level of brightness to filter out pixels under this level.
29
- * @remarks This value is expressed in gamma-space.
29
+ * @remarks This value is expressed in linear.
30
30
  */
31
31
  threshold: PostProcessEffectFloatParameter;
32
32
  /**