@galacean/engine-core 1.1.0-beta.3 → 1.1.0-beta.5

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.1.0-beta.3",
3
+ "version": "1.1.0-beta.5",
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.1.0-beta.3"
18
+ "@galacean/engine-math": "1.1.0-beta.5"
19
19
  },
20
20
  "devDependencies": {
21
- "@galacean/engine-design": "1.1.0-beta.3"
21
+ "@galacean/engine-design": "1.1.0-beta.5"
22
22
  },
23
23
  "scripts": {
24
24
  "b:types": "tsc"
@@ -39,5 +39,7 @@ export declare class Background {
39
39
  * @param _engine Engine Which the background belongs to.
40
40
  */
41
41
  constructor(_engine: Engine);
42
+ private _initMesh;
43
+ private _initMaterial;
42
44
  private _createPlane;
43
45
  }
@@ -5,8 +5,8 @@ import { Scene } from "./Scene";
5
5
  * The base class of the components.
6
6
  */
7
7
  export declare class Component extends EngineObject {
8
+ protected _phasedActiveInScene: boolean;
8
9
  private _phasedActive;
9
- private _phasedActiveInScene;
10
10
  private _enabled;
11
11
  /**
12
12
  * Indicates whether the component is enabled.
@@ -4,14 +4,16 @@ import { Material } from "../material/Material";
4
4
  import { Renderer } from "../Renderer";
5
5
  import { ShaderPass } from "../shader/ShaderPass";
6
6
  import { RenderState } from "../shader/state/RenderState";
7
+ import { IPoolElement } from "./IPoolElement";
7
8
  import { RenderElement } from "./RenderElement";
8
9
  /**
9
10
  * Render element.
10
11
  */
11
- export declare class MeshRenderElement extends RenderElement {
12
+ export declare class MeshRenderElement extends RenderElement implements IPoolElement {
12
13
  /** Mesh. */
13
14
  mesh: Mesh;
14
15
  /** Sub mesh. */
15
16
  subMesh: SubMesh;
16
17
  setValue(component: Renderer, mesh: Mesh, subMesh: SubMesh, material: Material, renderState: RenderState, shaderPass: ShaderPass): void;
18
+ dispose(): void;
17
19
  }
@@ -4,10 +4,12 @@ import { Renderer } from "../Renderer";
4
4
  import { ShaderPass } from "../shader";
5
5
  import { RenderState } from "../shader/state/RenderState";
6
6
  import { Texture2D } from "../texture";
7
+ import { IPoolElement } from "./IPoolElement";
7
8
  import { RenderElement } from "./RenderElement";
8
- export declare class SpriteElement extends RenderElement {
9
+ export declare class SpriteElement extends RenderElement implements IPoolElement {
9
10
  renderData: RenderData2D;
10
11
  texture: Texture2D;
11
12
  constructor();
12
13
  setValue(component: Renderer, renderDate: RenderData2D, material: Material, texture: Texture2D, renderState: RenderState, shaderPass: ShaderPass): void;
14
+ dispose(): void;
13
15
  }
@@ -1,10 +1,12 @@
1
1
  import { RenderData2D } from "../2d/data/RenderData2D";
2
2
  import { Material } from "../material/Material";
3
3
  import { Renderer } from "../Renderer";
4
+ import { IPoolElement } from "./IPoolElement";
4
5
  import { RenderElement } from "./RenderElement";
5
- export declare class SpriteMaskElement extends RenderElement {
6
+ export declare class SpriteMaskElement extends RenderElement implements IPoolElement {
6
7
  renderData: RenderData2D;
7
8
  isAdd: boolean;
8
9
  constructor();
9
10
  setValue(component: Renderer, renderData: RenderData2D, material: Material): void;
11
+ dispose(): void;
10
12
  }
@@ -1,6 +1,8 @@
1
+ import { IPoolElement } from "./IPoolElement";
1
2
  import { RenderElement } from "./RenderElement";
2
3
  import { SpriteElement } from "./SpriteElement";
3
- export declare class TextRenderElement extends RenderElement {
4
+ export declare class TextRenderElement extends RenderElement implements IPoolElement {
4
5
  charElements: SpriteElement[];
5
6
  constructor();
7
+ dispose(): void;
6
8
  }
package/types/Scene.d.ts CHANGED
@@ -41,6 +41,12 @@ export declare class Scene extends EngineObject {
41
41
  private _fogEnd;
42
42
  private _fogDensity;
43
43
  private _fogParams;
44
+ private _isActive;
45
+ /**
46
+ * Whether the scene is active.
47
+ */
48
+ get isActive(): boolean;
49
+ set isActive(value: boolean);
44
50
  /**
45
51
  * Scene-related shader data.
46
52
  */
@@ -7,7 +7,6 @@ export declare class DirectLight extends Light {
7
7
  private static _cullingMaskProperty;
8
8
  private static _colorProperty;
9
9
  private static _directionProperty;
10
- private static _combinedData;
11
10
  private _reverseDirection;
12
11
  /**
13
12
  * Get direction.
@@ -18,3 +17,11 @@ export declare class DirectLight extends Light {
18
17
  */
19
18
  get reverseDirection(): Vector3;
20
19
  }
20
+ /**
21
+ * Shader properties data of direct lights in the scene.
22
+ */
23
+ export interface IDirectLightShaderData {
24
+ cullingMask: Int32Array;
25
+ color: Float32Array;
26
+ direction: Float32Array;
27
+ }
@@ -6,10 +6,6 @@ import { ShadowType } from "../shadow";
6
6
  * Light base class.
7
7
  */
8
8
  export declare abstract class Light extends Component {
9
- /**
10
- * Each type of light source is at most 10, beyond which it will not take effect.
11
- * */
12
- protected static _maxLight: number;
13
9
  /** Light Intensity */
14
10
  intensity: number;
15
11
  /**
@@ -2,5 +2,12 @@
2
2
  * Light manager.
3
3
  */
4
4
  export declare class LightManager {
5
+ /**
6
+ * Each type of light source is at most 10, beyond which it will not take effect.
7
+ * */
8
+ private static _maxLight;
9
+ private _directData;
10
+ private _pointData;
11
+ private _spotData;
5
12
  private _getSunLightIndex;
6
13
  }
@@ -8,7 +8,6 @@ export declare class PointLight extends Light {
8
8
  private static _colorProperty;
9
9
  private static _positionProperty;
10
10
  private static _distanceProperty;
11
- private static _combinedData;
12
11
  /** Defines a distance cutoff at which the light's intensity must be considered zero. */
13
12
  distance: number;
14
13
  /**
@@ -16,3 +15,12 @@ export declare class PointLight extends Light {
16
15
  */
17
16
  get position(): Vector3;
18
17
  }
18
+ /**
19
+ * Shader properties data of point lights in the scene.
20
+ */
21
+ export interface IPointLightShaderData {
22
+ cullingMask: Int32Array;
23
+ color: Float32Array;
24
+ position: Float32Array;
25
+ distance: Float32Array;
26
+ }
@@ -11,7 +11,6 @@ export declare class SpotLight extends Light {
11
11
  private static _distanceProperty;
12
12
  private static _angleCosProperty;
13
13
  private static _penumbraCosProperty;
14
- private static _combinedData;
15
14
  /** Defines a distance cutoff at which the light's intensity must be considered zero. */
16
15
  distance: number;
17
16
  /** Angle, in radians, from centre of spotlight where falloff begins. */
@@ -33,3 +32,15 @@ export declare class SpotLight extends Light {
33
32
  */
34
33
  get reverseDirection(): Vector3;
35
34
  }
35
+ /**
36
+ * Shader properties data of spot lights in the scene.
37
+ */
38
+ export interface ISpotLightShaderData {
39
+ cullingMask: Int32Array;
40
+ color: Float32Array;
41
+ position: Float32Array;
42
+ direction: Float32Array;
43
+ distance: Float32Array;
44
+ angleCos: Float32Array;
45
+ penumbraCos: Float32Array;
46
+ }
@@ -26,22 +26,19 @@ export declare class MainModule implements ICustomClone {
26
26
  startSpeed: ParticleCompositeCurve;
27
27
  /** A flag to enable specifying particle size individually for each axis. */
28
28
  startSize3D: boolean;
29
- /** The initial size of particles when the Particle Generator first spawns them. */
30
- startSize: ParticleCompositeCurve;
31
29
  /** The initial size of particles along the x-axis when the Particle Generator first spawns them. */
32
30
  startSizeX: ParticleCompositeCurve;
33
31
  /** The initial size of particles along the y-axis when the Particle Generator first spawns them. */
34
32
  startSizeY: ParticleCompositeCurve;
35
33
  /** The initial size of particles along the z-axis when the Particle Generator first spawns them. */
36
34
  startSizeZ: ParticleCompositeCurve;
37
- /** A flag to enable 3D particle rotation. */
35
+ /** A flag to enable 3D particle rotation, when disabled, only `startRotationZ` is used. */
38
36
  startRotation3D: boolean;
39
- /** The initial rotation of particles when the Particle Generator first spawns them. */
40
- startRotation: ParticleCompositeCurve;
41
37
  /** The initial rotation of particles around the x-axis when emitted.*/
42
38
  startRotationX: ParticleCompositeCurve;
43
39
  /** The initial rotation of particles around the y-axis when emitted. */
44
40
  startRotationY: ParticleCompositeCurve;
41
+ /** The initial rotation of particles around the z-axis when emitted. */
45
42
  startRotationZ: ParticleCompositeCurve;
46
43
  /** Makes some particles spin in the opposite direction. */
47
44
  flipRotation: number;
@@ -65,4 +62,9 @@ export declare class MainModule implements ICustomClone {
65
62
  */
66
63
  get maxParticles(): number;
67
64
  set maxParticles(value: number);
65
+ /**
66
+ * The initial size of particles when the Particle Generator first spawns them.
67
+ */
68
+ get startSize(): ParticleCompositeCurve;
69
+ set startSize(value: ParticleCompositeCurve);
68
70
  }
@@ -18,7 +18,7 @@ export declare class RotationOverLifetimeModule extends ParticleGeneratorModule
18
18
  static readonly _maxCurveXProperty: ShaderProperty;
19
19
  static readonly _maxCurveYProperty: ShaderProperty;
20
20
  static readonly _maxCurveZProperty: ShaderProperty;
21
- /** Specifies whether the rotation is separate on each axis, when disabled only z axis is used. */
21
+ /** Specifies whether the rotation is separate on each axis, when disabled, only `rotationZ` is used. */
22
22
  separateAxes: boolean;
23
23
  /** Rotation over lifetime for z axis. */
24
24
  rotationX: ParticleCompositeCurve;
@@ -26,10 +26,6 @@ export declare class TextureSheetAnimationModule extends ParticleGeneratorModule
26
26
  * */
27
27
  get tiling(): Vector2;
28
28
  set tiling(value: Vector2);
29
- /**
30
- * @inheritDoc
31
- */
32
- cloneTo(dest: TextureSheetAnimationModule): void;
33
29
  }
34
30
  /**
35
31
  * Texture sheet animation type.