@galacean/engine-ui 2.0.0-alpha.49 → 2.0.0-alpha.50
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/browser.js.map +1 -1
- package/dist/browser.min.js.map +1 -1
- package/dist/main.js.map +1 -1
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
- package/types/Utils.d.ts +4 -4
- package/types/component/UICanvas.d.ts +2 -2
- package/types/component/UIGroup.d.ts +4 -4
- package/types/component/UIRenderer.d.ts +4 -4
- package/types/component/advanced/Image.d.ts +1 -1
- package/types/component/advanced/Text.d.ts +2 -2
- package/types/component/interactive/transition/SpriteTransition.d.ts +4 -4
- package/types/component/interactive/transition/Transition.d.ts +2 -2
- package/types/input/UIHitResult.d.ts +2 -2
- package/types/interface/IElement.d.ts +2 -2
- package/types/interface/IGroupAble.d.ts +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/engine-ui",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.50",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
"types/**/*"
|
|
28
28
|
],
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@galacean/engine": "2.0.0-alpha.
|
|
30
|
+
"@galacean/engine": "2.0.0-alpha.50"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"@galacean/engine": "2.0.0-alpha.
|
|
33
|
+
"@galacean/engine": "2.0.0-alpha.50"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"b:types": "tsc"
|
package/types/Utils.d.ts
CHANGED
|
@@ -4,13 +4,13 @@ import { IElement } from "./interface/IElement";
|
|
|
4
4
|
import { IGroupAble } from "./interface/IGroupAble";
|
|
5
5
|
export declare class Utils {
|
|
6
6
|
static setRootCanvasDirty(element: IElement): void;
|
|
7
|
-
static setRootCanvas(element: IElement, rootCanvas: UICanvas): void;
|
|
7
|
+
static setRootCanvas(element: IElement, rootCanvas: UICanvas | null): void;
|
|
8
8
|
static cleanRootCanvas(element: IElement): void;
|
|
9
|
-
static searchRootCanvasInParents(element: IElement): UICanvas;
|
|
9
|
+
static searchRootCanvasInParents(element: IElement): UICanvas | null;
|
|
10
10
|
static setGroupDirty(element: IGroupAble): void;
|
|
11
|
-
static setGroup(element: IGroupAble, group: UIGroup): void;
|
|
11
|
+
static setGroup(element: IGroupAble, group: UIGroup | null): void;
|
|
12
12
|
static cleanGroup(element: IGroupAble): void;
|
|
13
|
-
static searchGroupInParents(element: IGroupAble): UIGroup;
|
|
13
|
+
static searchGroupInParents(element: IGroupAble): UIGroup | null;
|
|
14
14
|
private static _registerRootCanvas;
|
|
15
15
|
private static _registerGroup;
|
|
16
16
|
private static _registerListener;
|
|
@@ -18,7 +18,7 @@ export declare class UICanvas extends Component implements IElement, ICloneHook<
|
|
|
18
18
|
/** @internal */
|
|
19
19
|
_canvasIndex: number;
|
|
20
20
|
/** @internal */
|
|
21
|
-
_rootCanvas: UICanvas;
|
|
21
|
+
_rootCanvas: UICanvas | null;
|
|
22
22
|
/** @internal */
|
|
23
23
|
_indexInRootCanvas: number;
|
|
24
24
|
/** @internal */
|
|
@@ -106,7 +106,7 @@ export declare class UICanvas extends Component implements IElement, ICloneHook<
|
|
|
106
106
|
/**
|
|
107
107
|
* @internal
|
|
108
108
|
*/
|
|
109
|
-
_getRootCanvas(): UICanvas;
|
|
109
|
+
_getRootCanvas(): UICanvas | null;
|
|
110
110
|
/**
|
|
111
111
|
* @internal
|
|
112
112
|
*/
|
|
@@ -7,9 +7,9 @@ export declare class UIGroup extends Component implements IGroupAble {
|
|
|
7
7
|
/** @internal */
|
|
8
8
|
_indexInRootCanvas: number;
|
|
9
9
|
/** @internal */
|
|
10
|
-
_group: UIGroup;
|
|
10
|
+
_group: UIGroup | null;
|
|
11
11
|
/** @internal */
|
|
12
|
-
_rootCanvas: UICanvas;
|
|
12
|
+
_rootCanvas: UICanvas | null;
|
|
13
13
|
/** @internal */
|
|
14
14
|
_disorderedElements: DisorderedArray<IGroupAble>;
|
|
15
15
|
/** @internal */
|
|
@@ -66,11 +66,11 @@ export declare class UIGroup extends Component implements IGroupAble {
|
|
|
66
66
|
/**
|
|
67
67
|
* @internal
|
|
68
68
|
*/
|
|
69
|
-
_getRootCanvas(): UICanvas;
|
|
69
|
+
_getRootCanvas(): UICanvas | null;
|
|
70
70
|
/**
|
|
71
71
|
* @internal
|
|
72
72
|
*/
|
|
73
|
-
_getGroup(): UIGroup;
|
|
73
|
+
_getGroup(): UIGroup | null;
|
|
74
74
|
/**
|
|
75
75
|
* @internal
|
|
76
76
|
*/
|
|
@@ -21,7 +21,7 @@ export declare class UIRenderer extends Renderer implements IGraphics {
|
|
|
21
21
|
*/
|
|
22
22
|
raycastPadding: Vector4;
|
|
23
23
|
/** @internal */
|
|
24
|
-
_rootCanvas: UICanvas;
|
|
24
|
+
_rootCanvas: UICanvas | null;
|
|
25
25
|
/** @internal */
|
|
26
26
|
_indexInRootCanvas: number;
|
|
27
27
|
/** @internal */
|
|
@@ -29,7 +29,7 @@ export declare class UIRenderer extends Renderer implements IGraphics {
|
|
|
29
29
|
/** @internal */
|
|
30
30
|
_rootCanvasListeningEntities: Entity[];
|
|
31
31
|
/** @internal */
|
|
32
|
-
_group: UIGroup;
|
|
32
|
+
_group: UIGroup | null;
|
|
33
33
|
/** @internal */
|
|
34
34
|
_indexInGroup: number;
|
|
35
35
|
/** @internal */
|
|
@@ -85,11 +85,11 @@ export declare class UIRenderer extends Renderer implements IGraphics {
|
|
|
85
85
|
/**
|
|
86
86
|
* @internal
|
|
87
87
|
*/
|
|
88
|
-
_getRootCanvas(): UICanvas;
|
|
88
|
+
_getRootCanvas(): UICanvas | null;
|
|
89
89
|
/**
|
|
90
90
|
* @internal
|
|
91
91
|
*/
|
|
92
|
-
_getGroup(): UIGroup;
|
|
92
|
+
_getGroup(): UIGroup | null;
|
|
93
93
|
/**
|
|
94
94
|
* @internal
|
|
95
95
|
*/
|
|
@@ -29,8 +29,8 @@ export declare class Text extends UIRenderer implements ITextRenderer {
|
|
|
29
29
|
/**
|
|
30
30
|
* The font of the Text.
|
|
31
31
|
*/
|
|
32
|
-
get font(): Font;
|
|
33
|
-
set font(value: Font);
|
|
32
|
+
get font(): Font | null;
|
|
33
|
+
set font(value: Font | null);
|
|
34
34
|
/**
|
|
35
35
|
* Font size in pixels, used for glyph rasterization.
|
|
36
36
|
* Glyph pixel dimensions are converted to local UI units using the root canvas's
|
|
@@ -4,8 +4,8 @@ import { Transition } from "./Transition";
|
|
|
4
4
|
/**
|
|
5
5
|
* Sprite transition.
|
|
6
6
|
*/
|
|
7
|
-
export declare class SpriteTransition extends Transition<Sprite, Image> {
|
|
8
|
-
protected _getTargetValueCopy(): Sprite;
|
|
9
|
-
protected _updateCurrentValue(srcValue: Sprite, destValue: Sprite, weight: number): void;
|
|
10
|
-
protected _applyValue(value: Sprite): void;
|
|
7
|
+
export declare class SpriteTransition extends Transition<Sprite | null, Image> {
|
|
8
|
+
protected _getTargetValueCopy(): Sprite | null;
|
|
9
|
+
protected _updateCurrentValue(srcValue: Sprite | null, destValue: Sprite | null, weight: number): void;
|
|
10
|
+
protected _applyValue(value: Sprite | null): void;
|
|
11
11
|
}
|
|
@@ -7,7 +7,7 @@ import { InteractiveState, UIInteractive } from "../UIInteractive";
|
|
|
7
7
|
*/
|
|
8
8
|
export declare abstract class Transition<T extends TransitionValueType = TransitionValueType, K extends UIRenderer = UIRenderer> extends DataObject implements ICloneHook<Transition<T, K>> {
|
|
9
9
|
/** @internal */
|
|
10
|
-
_interactive: UIInteractive;
|
|
10
|
+
_interactive: UIInteractive | null;
|
|
11
11
|
protected _target: K;
|
|
12
12
|
protected _normal: T;
|
|
13
13
|
protected _pressed: T;
|
|
@@ -71,4 +71,4 @@ export declare abstract class Transition<T extends TransitionValueType = Transit
|
|
|
71
71
|
private _addStateValuesReferCount;
|
|
72
72
|
private _getValueByState;
|
|
73
73
|
}
|
|
74
|
-
export type TransitionValueType = number | Sprite | Color;
|
|
74
|
+
export type TransitionValueType = number | Sprite | Color | null;
|
|
@@ -4,9 +4,9 @@ import { UIRenderer } from "../component/UIRenderer";
|
|
|
4
4
|
* @internal
|
|
5
5
|
*/
|
|
6
6
|
export declare class UIHitResult {
|
|
7
|
-
entity: Entity;
|
|
7
|
+
entity: Entity | null;
|
|
8
8
|
distance: number;
|
|
9
9
|
point: Vector3;
|
|
10
10
|
normal: Vector3;
|
|
11
|
-
component: UIRenderer;
|
|
11
|
+
component: UIRenderer | null;
|
|
12
12
|
}
|
|
@@ -3,11 +3,11 @@ import { UICanvas } from "..";
|
|
|
3
3
|
import { RootCanvasModifyFlags } from "../component/UICanvas";
|
|
4
4
|
export interface IElement {
|
|
5
5
|
entity: Entity;
|
|
6
|
-
_rootCanvas: UICanvas;
|
|
6
|
+
_rootCanvas: UICanvas | null;
|
|
7
7
|
_indexInRootCanvas: number;
|
|
8
8
|
_rootCanvasListeningEntities: Entity[];
|
|
9
9
|
_isRootCanvasDirty: boolean;
|
|
10
|
-
_getRootCanvas(): UICanvas;
|
|
10
|
+
_getRootCanvas(): UICanvas | null;
|
|
11
11
|
_rootCanvasListener: (flag: number, param?: any) => void;
|
|
12
12
|
_onRootCanvasModify?(flag: RootCanvasModifyFlags): void;
|
|
13
13
|
}
|
|
@@ -2,13 +2,13 @@ import { Entity } from "@galacean/engine";
|
|
|
2
2
|
import { GroupModifyFlags, UIGroup } from "../component/UIGroup";
|
|
3
3
|
import { IElement } from "./IElement";
|
|
4
4
|
export interface IGroupAble extends IElement {
|
|
5
|
-
_group: UIGroup;
|
|
5
|
+
_group: UIGroup | null;
|
|
6
6
|
_indexInGroup: number;
|
|
7
7
|
_groupListeningEntities: Entity[];
|
|
8
8
|
_isGroupDirty: boolean;
|
|
9
9
|
_globalAlpha?: number;
|
|
10
10
|
_globalInteractive?: boolean;
|
|
11
|
-
_getGroup(): UIGroup;
|
|
11
|
+
_getGroup(): UIGroup | null;
|
|
12
12
|
_onGroupModify(flag: GroupModifyFlags, isPass?: boolean): void;
|
|
13
13
|
_groupListener(flag: number): void;
|
|
14
14
|
}
|