@galacean/engine-core 1.5.0-alpha.1 → 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.1",
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.1"
21
+ "@galacean/engine-math": "1.5.0-alpha.2"
22
22
  },
23
23
  "devDependencies": {
24
- "@galacean/engine-design": "1.5.0-alpha.1"
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
@@ -52,13 +52,6 @@ export declare class Camera extends Component {
52
52
  * @defaultValue `Downsampling.TwoX`
53
53
  */
54
54
  opaqueTextureDownsampling: Downsampling;
55
- /**
56
- * The number of samples used for hardware multisample anti-aliasing (MSAA) to smooth geometry edges during rasterization.
57
- * Higher sample counts (e.g., 2x, 4x, 8x) produce smoother edges.
58
- *
59
- * @defaultValue `MSAASamples.FourX`
60
- */
61
- msaaSamples: MSAASamples;
62
55
  /**
63
56
  * The screen-space anti-aliasing mode applied after the camera renders the final image.
64
57
  * Unlike MSAA, it can smooth all pixels, including by shader-generated specular, alpha-cutoff edge, low resolution texture.
@@ -66,6 +59,17 @@ export declare class Camera extends Component {
66
59
  * @defaultValue `AntiAliasing.None`
67
60
  */
68
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;
69
73
  private _priority;
70
74
  private _shaderData;
71
75
  private _isCustomViewMatrix;
@@ -80,6 +84,7 @@ export declare class Camera extends Component {
80
84
  private _opaqueTextureEnabled;
81
85
  private _enableHDR;
82
86
  private _enablePostProcess;
87
+ private _msaaSamples;
83
88
  private _updateFlagManager;
84
89
  private _frustumChangeFlag;
85
90
  private _isViewMatrixDirty;
@@ -176,6 +181,14 @@ export declare class Camera extends Component {
176
181
  */
177
182
  get renderTarget(): RenderTarget | null;
178
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);
179
192
  /**
180
193
  * Restore the view matrix to the world matrix of the entity.
181
194
  */
@@ -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
  /**