@galacean/engine-core 0.9.6 → 0.9.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/dist/main.js +180 -72
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +180 -72
- package/dist/module.js +180 -72
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
- package/types/2d/sprite/Sprite.d.ts +12 -2
- package/types/2d/sprite/SpriteMask.d.ts +15 -4
- package/types/2d/sprite/SpriteRenderer.d.ts +15 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/engine-core",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.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": "0.9.
|
|
18
|
+
"@galacean/engine-math": "0.9.8"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@galacean/engine-design": "0.9.
|
|
21
|
+
"@galacean/engine-design": "0.9.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 RefObject {
|
|
9
9
|
/** The name of sprite. */
|
|
10
10
|
name: string;
|
|
11
|
-
private
|
|
12
|
-
private
|
|
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 RefObject {
|
|
|
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);
|
|
@@ -10,18 +10,28 @@ export declare class SpriteMask extends Renderer implements ICustomClone {
|
|
|
10
10
|
/** The mask layers the sprite mask influence to. */
|
|
11
11
|
influenceLayers: number;
|
|
12
12
|
private _sprite;
|
|
13
|
-
private
|
|
14
|
-
private
|
|
13
|
+
private _automaticWidth;
|
|
14
|
+
private _automaticHeight;
|
|
15
|
+
private _customWidth;
|
|
16
|
+
private _customHeight;
|
|
15
17
|
private _flipX;
|
|
16
18
|
private _flipY;
|
|
17
19
|
private _alphaCutoff;
|
|
18
20
|
/**
|
|
19
|
-
* Render width.
|
|
21
|
+
* Render width (in world coordinates).
|
|
22
|
+
*
|
|
23
|
+
* @remarks
|
|
24
|
+
* If width is set, return the set value,
|
|
25
|
+
* otherwise return `SpriteMask.sprite.width`.
|
|
20
26
|
*/
|
|
21
27
|
get width(): number;
|
|
22
28
|
set width(value: number);
|
|
23
29
|
/**
|
|
24
|
-
* Render height.
|
|
30
|
+
* Render height (in world coordinates).
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* If height is set, return the set value,
|
|
34
|
+
* otherwise return `SpriteMask.sprite.height`.
|
|
25
35
|
*/
|
|
26
36
|
get height(): number;
|
|
27
37
|
set height(value: number);
|
|
@@ -59,5 +69,6 @@ export declare class SpriteMask extends Renderer implements ICustomClone {
|
|
|
59
69
|
* @inheritdoc
|
|
60
70
|
*/
|
|
61
71
|
protected _render(context: RenderContext): void;
|
|
72
|
+
private _calDefaultSize;
|
|
62
73
|
private _onSpriteChange;
|
|
63
74
|
}
|
|
@@ -13,8 +13,10 @@ export declare class SpriteRenderer extends Renderer implements ICustomClone {
|
|
|
13
13
|
private _assembler;
|
|
14
14
|
private _color;
|
|
15
15
|
private _sprite;
|
|
16
|
-
private
|
|
17
|
-
private
|
|
16
|
+
private _automaticWidth;
|
|
17
|
+
private _automaticHeight;
|
|
18
|
+
private _customWidth;
|
|
19
|
+
private _customHeight;
|
|
18
20
|
private _flipX;
|
|
19
21
|
private _flipY;
|
|
20
22
|
private _maskLayer;
|
|
@@ -35,12 +37,20 @@ export declare class SpriteRenderer extends Renderer implements ICustomClone {
|
|
|
35
37
|
get color(): Color;
|
|
36
38
|
set color(value: Color);
|
|
37
39
|
/**
|
|
38
|
-
* Render width.
|
|
40
|
+
* Render width (in world coordinates).
|
|
41
|
+
*
|
|
42
|
+
* @remarks
|
|
43
|
+
* If width is set, return the set value,
|
|
44
|
+
* otherwise return `SpriteRenderer.sprite.width`.
|
|
39
45
|
*/
|
|
40
46
|
get width(): number;
|
|
41
47
|
set width(value: number);
|
|
42
48
|
/**
|
|
43
|
-
* Render height.
|
|
49
|
+
* Render height (in world coordinates).
|
|
50
|
+
*
|
|
51
|
+
* @remarks
|
|
52
|
+
* If height is set, return the set value,
|
|
53
|
+
* otherwise return `SpriteRenderer.sprite.height`.
|
|
44
54
|
*/
|
|
45
55
|
get height(): number;
|
|
46
56
|
set height(value: number);
|
|
@@ -72,6 +82,7 @@ export declare class SpriteRenderer extends Renderer implements ICustomClone {
|
|
|
72
82
|
* @override
|
|
73
83
|
*/
|
|
74
84
|
protected _render(context: RenderContext): void;
|
|
85
|
+
private _calDefaultSize;
|
|
75
86
|
private _updateStencilState;
|
|
76
87
|
private _onSpriteChange;
|
|
77
88
|
}
|