@galacean/engine-core 1.0.0-beta.6 → 1.0.0-beta.8

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.0.0-beta.6",
3
+ "version": "1.0.0-beta.8",
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.0.0-beta.6"
18
+ "@galacean/engine-math": "1.0.0-beta.8"
19
19
  },
20
20
  "devDependencies": {
21
- "@galacean/engine-design": "1.0.0-beta.6"
21
+ "@galacean/engine-design": "1.0.0-beta.8"
22
22
  },
23
23
  "scripts": {
24
24
  "b:types": "tsc"
@@ -8,8 +8,10 @@ import { Texture2D } from "../../texture/Texture2D";
8
8
  export declare class Sprite extends ReferResource {
9
9
  /** The name of sprite. */
10
10
  name: string;
11
- private _width;
12
- private _height;
11
+ private _automaticWidth;
12
+ private _automaticHeight;
13
+ private _customWidth;
14
+ private _customHeight;
13
15
  private _positions;
14
16
  private _uvs;
15
17
  private _bounds;
@@ -28,11 +30,19 @@ export declare class Sprite extends ReferResource {
28
30
  set texture(value: Texture2D);
29
31
  /**
30
32
  * The width of the sprite (in world coordinates).
33
+ *
34
+ * @remarks
35
+ * If width is set, return the set value,
36
+ * otherwise return the width calculated according to `Texture.width`, `Sprite.region`, `Sprite.atlasRegion`, `Sprite.atlasRegionOffset` and `Engine._pixelsPerUnit`.
31
37
  */
32
38
  get width(): number;
33
39
  set width(value: number);
34
40
  /**
35
41
  * The height of the sprite (in world coordinates).
42
+ *
43
+ * @remarks
44
+ * If height is set, return the set value,
45
+ * otherwise return the height calculated according to `Texture.height`, `Sprite.region`, `Sprite.atlasRegion`, `Sprite.atlasRegionOffset` and `Engine._pixelsPerUnit`.
36
46
  */
37
47
  get height(): number;
38
48
  set height(value: number);
@@ -8,18 +8,28 @@ export declare class SpriteMask extends Renderer implements ICustomClone {
8
8
  /** The mask layers the sprite mask influence to. */
9
9
  influenceLayers: number;
10
10
  private _sprite;
11
- private _width;
12
- private _height;
11
+ private _automaticWidth;
12
+ private _automaticHeight;
13
+ private _customWidth;
14
+ private _customHeight;
13
15
  private _flipX;
14
16
  private _flipY;
15
17
  private _alphaCutoff;
16
18
  /**
17
- * Render width.
19
+ * Render width (in world coordinates).
20
+ *
21
+ * @remarks
22
+ * If width is set, return the set value,
23
+ * otherwise return `SpriteMask.sprite.width`.
18
24
  */
19
25
  get width(): number;
20
26
  set width(value: number);
21
27
  /**
22
- * Render height.
28
+ * Render height (in world coordinates).
29
+ *
30
+ * @remarks
31
+ * If height is set, return the set value,
32
+ * otherwise return `SpriteMask.sprite.height`.
23
33
  */
24
34
  get height(): number;
25
35
  set height(value: number);
@@ -43,5 +53,6 @@ export declare class SpriteMask extends Renderer implements ICustomClone {
43
53
  */
44
54
  get alphaCutoff(): number;
45
55
  set alphaCutoff(value: number);
56
+ private _calDefaultSize;
46
57
  private _onSpriteChange;
47
58
  }
@@ -15,8 +15,10 @@ export declare class SpriteRenderer extends Renderer implements ICustomClone {
15
15
  private _tiledAdaptiveThreshold;
16
16
  private _color;
17
17
  private _sprite;
18
- private _width;
19
- private _height;
18
+ private _automaticWidth;
19
+ private _automaticHeight;
20
+ private _customWidth;
21
+ private _customHeight;
20
22
  private _flipX;
21
23
  private _flipY;
22
24
  private _maskLayer;
@@ -47,12 +49,20 @@ export declare class SpriteRenderer extends Renderer implements ICustomClone {
47
49
  get color(): Color;
48
50
  set color(value: Color);
49
51
  /**
50
- * Render width.
52
+ * Render width (in world coordinates).
53
+ *
54
+ * @remarks
55
+ * If width is set, return the set value,
56
+ * otherwise return `SpriteRenderer.sprite.width`.
51
57
  */
52
58
  get width(): number;
53
59
  set width(value: number);
54
60
  /**
55
- * Render height.
61
+ * Render height (in world coordinates).
62
+ *
63
+ * @remarks
64
+ * If height is set, return the set value,
65
+ * otherwise return `SpriteRenderer.sprite.height`.
56
66
  */
57
67
  get height(): number;
58
68
  set height(value: number);
@@ -76,6 +86,7 @@ export declare class SpriteRenderer extends Renderer implements ICustomClone {
76
86
  */
77
87
  get maskInteraction(): SpriteMaskInteraction;
78
88
  set maskInteraction(value: SpriteMaskInteraction);
89
+ private _calDefaultSize;
79
90
  private _updateStencilState;
80
91
  private _onSpriteChange;
81
92
  }
@@ -9,12 +9,18 @@ export declare class MeshRenderer extends Renderer implements ICustomClone {
9
9
  private static _uv1Macro;
10
10
  private static _normalMacro;
11
11
  private static _tangentMacro;
12
- private static _vertexColorMacro;
12
+ private static _enableVertexColorMacro;
13
+ private _enableVertexColor;
13
14
  /**
14
15
  * Mesh assigned to the renderer.
15
16
  */
16
17
  get mesh(): Mesh;
17
18
  set mesh(value: Mesh);
19
+ /**
20
+ * Whether enable vertex color.
21
+ */
22
+ get enableVertexColor(): boolean;
23
+ set enableVertexColor(value: boolean);
18
24
  private _setMesh;
19
25
  private _onMeshChanged;
20
26
  }