@galacean/engine-ui 1.6.8 → 1.6.9
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 +3662 -0
- package/dist/browser.js.map +1 -0
- package/dist/browser.min.js +2 -0
- package/dist/browser.min.js.map +1 -0
- package/dist/main.js +3658 -0
- package/dist/main.js.map +1 -0
- package/dist/module.js +3639 -0
- package/dist/module.js.map +1 -0
- package/package.json +3 -3
- package/types/Utils.d.ts +18 -0
- package/types/component/UICanvas.d.ts +91 -0
- package/types/component/UIGroup.d.ts +37 -0
- package/types/component/UIRenderer.d.ts +36 -0
- package/types/component/UITransform.d.ts +111 -0
- package/types/component/advanced/Button.d.ts +21 -0
- package/types/component/advanced/Image.d.ts +37 -0
- package/types/component/advanced/Text.d.ts +88 -0
- package/types/component/index.d.ts +11 -0
- package/types/component/interactive/UIInteractive.d.ts +55 -0
- package/types/component/interactive/transition/ColorTransition.d.ts +17 -0
- package/types/component/interactive/transition/ScaleTransition.d.ts +11 -0
- package/types/component/interactive/transition/SpriteTransition.d.ts +11 -0
- package/types/component/interactive/transition/Transition.d.ts +57 -0
- package/types/enums/CanvasRenderMode.d.ts +22 -0
- package/types/enums/HorizontalAlignmentMode.d.ts +13 -0
- package/types/enums/ResolutionAdaptationMode.d.ts +16 -0
- package/types/enums/VerticalAlignmentMode.d.ts +13 -0
- package/types/index.d.ts +25 -0
- package/types/input/UIHitResult.d.ts +1 -0
- package/types/input/UIPointerEventEmitter.d.ts +1 -0
- package/types/interface/IElement.d.ts +13 -0
- package/types/interface/IGraphics.d.ts +8 -0
- package/types/interface/IGroupAble.d.ts +14 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolution adaptation mode.
|
|
3
|
+
* @remarks Only effective in screen space.
|
|
4
|
+
*/
|
|
5
|
+
export declare enum ResolutionAdaptationMode {
|
|
6
|
+
/** Adapt based on width.(`referenceResolution.x`) */
|
|
7
|
+
WidthAdaptation = 0,
|
|
8
|
+
/** Adapt based on height.(`referenceResolution.y`) */
|
|
9
|
+
HeightAdaptation = 1,
|
|
10
|
+
/** Adapt based on both width and height.(`referenceResolution`) */
|
|
11
|
+
BothAdaptation = 2,
|
|
12
|
+
/** Adapt to the side with a larger ratio. */
|
|
13
|
+
ExpandAdaptation = 3,
|
|
14
|
+
/** Adapt to the side with smaller ratio. */
|
|
15
|
+
ShrinkAdaptation = 4
|
|
16
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** Vertical alignment mode. */
|
|
2
|
+
export declare enum VerticalAlignmentMode {
|
|
3
|
+
/** No vertical alignment. */
|
|
4
|
+
None = 0,
|
|
5
|
+
/** Top-aligned, `alignTop` drives `position.y`. */
|
|
6
|
+
Top = 1,
|
|
7
|
+
/** Bottom-aligned, `alignBottom` drives `position.y`. */
|
|
8
|
+
Bottom = 2,
|
|
9
|
+
/** Vertical stretch, `alignTop` and `alignBottom` drive `position.y` and `size.y`. */
|
|
10
|
+
TopAndBottom = 3,
|
|
11
|
+
/** Middle-aligned, `alignMiddle` drives `position.y`. */
|
|
12
|
+
Middle = 4
|
|
13
|
+
}
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Material } from "@galacean/engine";
|
|
2
|
+
export * from "./component";
|
|
3
|
+
export { CanvasRenderMode } from "./enums/CanvasRenderMode";
|
|
4
|
+
export { ResolutionAdaptationMode } from "./enums/ResolutionAdaptationMode";
|
|
5
|
+
export { UIPointerEventEmitter } from "./input/UIPointerEventEmitter";
|
|
6
|
+
export { HorizontalAlignmentMode } from "./enums/HorizontalAlignmentMode";
|
|
7
|
+
export { VerticalAlignmentMode } from "./enums/VerticalAlignmentMode";
|
|
8
|
+
export declare class EngineExtension {
|
|
9
|
+
_uiDefaultMaterial: Material;
|
|
10
|
+
_getUIDefaultMaterial(): Material;
|
|
11
|
+
}
|
|
12
|
+
export declare class EntityExtension {
|
|
13
|
+
_uiHierarchyVersion: number;
|
|
14
|
+
_updateUIHierarchyVersion(version: number): void;
|
|
15
|
+
}
|
|
16
|
+
declare module "@galacean/engine" {
|
|
17
|
+
interface Engine {
|
|
18
|
+
}
|
|
19
|
+
interface Entity {
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Register GUI components for the editor.
|
|
24
|
+
*/
|
|
25
|
+
export declare function registerGUI(): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Entity } from "@galacean/engine";
|
|
2
|
+
import { UICanvas } from "..";
|
|
3
|
+
import { RootCanvasModifyFlags } from "../component/UICanvas";
|
|
4
|
+
export interface IElement {
|
|
5
|
+
entity: Entity;
|
|
6
|
+
_rootCanvas: UICanvas;
|
|
7
|
+
_indexInRootCanvas: number;
|
|
8
|
+
_rootCanvasListeningEntities: Entity[];
|
|
9
|
+
_isRootCanvasDirty: boolean;
|
|
10
|
+
_getRootCanvas(): UICanvas;
|
|
11
|
+
_rootCanvasListener: (flag: number, param?: any) => void;
|
|
12
|
+
_onRootCanvasModify?(flag: RootCanvasModifyFlags): void;
|
|
13
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Ray, Vector4 } from "@galacean/engine";
|
|
2
|
+
import { UIHitResult } from "../input/UIHitResult";
|
|
3
|
+
import { IGroupAble } from "./IGroupAble";
|
|
4
|
+
export interface IGraphics extends IGroupAble {
|
|
5
|
+
raycastEnabled: boolean;
|
|
6
|
+
raycastPadding: Vector4;
|
|
7
|
+
_raycast(ray: Ray, out: UIHitResult, distance: number): boolean;
|
|
8
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Entity } from "@galacean/engine";
|
|
2
|
+
import { GroupModifyFlags, UIGroup } from "../component/UIGroup";
|
|
3
|
+
import { IElement } from "./IElement";
|
|
4
|
+
export interface IGroupAble extends IElement {
|
|
5
|
+
_group: UIGroup;
|
|
6
|
+
_indexInGroup: number;
|
|
7
|
+
_groupListeningEntities: Entity[];
|
|
8
|
+
_isGroupDirty: boolean;
|
|
9
|
+
_globalAlpha?: number;
|
|
10
|
+
_globalInteractive?: boolean;
|
|
11
|
+
_getGroup(): UIGroup;
|
|
12
|
+
_onGroupModify(flag: GroupModifyFlags, isPass?: boolean): void;
|
|
13
|
+
_groupListener(flag: number): void;
|
|
14
|
+
}
|