@babylonjs/gui-editor 5.0.0-rc.12 → 5.0.0-rc.13
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.
@@ -7,9 +7,6 @@ interface ICommandBarComponentProps {
|
|
7
7
|
globalState: GlobalState;
|
8
8
|
}
|
9
9
|
export class CommandBarComponent extends React.Component<ICommandBarComponentProps> {
|
10
|
-
private _panning;
|
11
|
-
private _zooming;
|
12
|
-
private _selecting;
|
13
10
|
private _sizeOption;
|
14
11
|
constructor(props: ICommandBarComponentProps);
|
15
12
|
render(): JSX.Element;
|
@@ -953,15 +950,8 @@ export class WorkbenchComponent extends React.Component<IWorkbenchComponentProps
|
|
953
950
|
private _setConstraintDirection;
|
954
951
|
private _mouseStartPoint;
|
955
952
|
_scene: Scene;
|
956
|
-
private _ctrlKeyIsPressed;
|
957
|
-
private _altKeyIsPressed;
|
958
953
|
private _constraintDirection;
|
959
|
-
private _forcePanning;
|
960
|
-
private _forceZooming;
|
961
|
-
private _forceSelecting;
|
962
954
|
private _panning;
|
963
|
-
private _canvas;
|
964
|
-
private _responsive;
|
965
955
|
private _isOverGUINode;
|
966
956
|
private _engine;
|
967
957
|
private _liveRenderObserver;
|
@@ -997,7 +987,7 @@ export class WorkbenchComponent extends React.Component<IWorkbenchComponentProps
|
|
997
987
|
pasteFromClipboard(clipboardContents: string): boolean;
|
998
988
|
CopyGUIControl(original: Control): void;
|
999
989
|
blurEvent: () => void;
|
1000
|
-
|
990
|
+
dispose(): void;
|
1001
991
|
loadFromJson(serializationObject: any): void;
|
1002
992
|
loadFromSnippet(snippetId: string): Promise<void>;
|
1003
993
|
loadToEditor(): void;
|
@@ -1045,12 +1035,18 @@ import { Scene } from "@babylonjs/core/scene";
|
|
1045
1035
|
import { Control } from "@babylonjs/gui/2D/controls/control";
|
1046
1036
|
import { LockObject } from "shared-ui-components/tabs/propertyGrids/lockObject";
|
1047
1037
|
import { ISize } from "@babylonjs/core/Maths/math";
|
1038
|
+
import { KeyboardManager } from "@babylonjs/gui-editor/keyboardManager";
|
1048
1039
|
export enum DragOverLocation {
|
1049
1040
|
ABOVE = 0,
|
1050
1041
|
BELOW = 1,
|
1051
1042
|
CENTER = 2,
|
1052
1043
|
NONE = 3
|
1053
1044
|
}
|
1045
|
+
export enum GUIEditorTool {
|
1046
|
+
SELECT = 0,
|
1047
|
+
PAN = 1,
|
1048
|
+
ZOOM = 2
|
1049
|
+
}
|
1054
1050
|
export class GlobalState {
|
1055
1051
|
liveGuiTexture: Nullable<AdvancedDynamicTexture>;
|
1056
1052
|
guiTexture: AdvancedDynamicTexture;
|
@@ -1072,17 +1068,19 @@ export class GlobalState {
|
|
1072
1068
|
onPopupClosedObservable: Observable<void>;
|
1073
1069
|
private _backgroundColor;
|
1074
1070
|
private _outlines;
|
1075
|
-
|
1076
|
-
|
1071
|
+
keys: KeyboardManager;
|
1072
|
+
/** DO NOT USE: in the process of removing */
|
1077
1073
|
blockKeyboardEvents: boolean;
|
1074
|
+
onOutlineChangedObservable: Observable<void>;
|
1078
1075
|
controlCamera: boolean;
|
1079
1076
|
selectionLock: boolean;
|
1080
1077
|
workbench: WorkbenchComponent;
|
1081
1078
|
onPropertyChangedObservable: Observable<PropertyChangedEvent>;
|
1082
|
-
|
1079
|
+
private _tool;
|
1080
|
+
onToolChangeObservable: Observable<void>;
|
1081
|
+
get tool(): GUIEditorTool;
|
1082
|
+
set tool(newTool: GUIEditorTool);
|
1083
1083
|
onFitToWindowObservable: Observable<void>;
|
1084
|
-
onPanObservable: Observable<void>;
|
1085
|
-
onSelectionButtonObservable: Observable<void>;
|
1086
1084
|
onLoadObservable: Observable<File>;
|
1087
1085
|
onSaveObservable: Observable<void>;
|
1088
1086
|
onSnippetLoadObservable: Observable<void>;
|
@@ -1118,7 +1116,6 @@ export class GlobalState {
|
|
1118
1116
|
constructor();
|
1119
1117
|
/** adds copy, cut and paste listeners to the host window */
|
1120
1118
|
registerEventListeners(): void;
|
1121
|
-
private _updateKeys;
|
1122
1119
|
get backgroundColor(): Color3;
|
1123
1120
|
set backgroundColor(value: Color3);
|
1124
1121
|
get outlines(): boolean;
|
@@ -1127,6 +1124,7 @@ export class GlobalState {
|
|
1127
1124
|
setSelection(controls: Control[]): void;
|
1128
1125
|
deleteSelectedNodes(): void;
|
1129
1126
|
isMultiSelectable(control: Control): boolean;
|
1127
|
+
dispose(): void;
|
1130
1128
|
}
|
1131
1129
|
|
1132
1130
|
}
|
@@ -1187,6 +1185,26 @@ export class GUINodeTools {
|
|
1187
1185
|
declare module "@babylonjs/gui-editor/index" {
|
1188
1186
|
export * from "@babylonjs/gui-editor/guiEditor";
|
1189
1187
|
|
1188
|
+
}
|
1189
|
+
declare module "@babylonjs/gui-editor/keyboardManager" {
|
1190
|
+
import { Observable } from "@babylonjs/core/Misc/observable";
|
1191
|
+
type Key = "control" | "shift" | "alt" | "space" | "meta";
|
1192
|
+
export class KeyboardManager {
|
1193
|
+
private _hostElement;
|
1194
|
+
private _kdListener;
|
1195
|
+
private _kuListener;
|
1196
|
+
private _moveListener;
|
1197
|
+
private _keys;
|
1198
|
+
onKeyPressedObservable: Observable<Key>;
|
1199
|
+
constructor(hostElement: HTMLElement | HTMLDocument);
|
1200
|
+
private _keyEvent;
|
1201
|
+
private _updateModifierKeys;
|
1202
|
+
private _setKeyDown;
|
1203
|
+
isKeyDown(key: Key): boolean;
|
1204
|
+
dispose(): void;
|
1205
|
+
}
|
1206
|
+
export {};
|
1207
|
+
|
1190
1208
|
}
|
1191
1209
|
declare module "@babylonjs/gui-editor/legacy/legacy" {
|
1192
1210
|
export * from "@babylonjs/gui-editor/index";
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@babylonjs/gui-editor",
|
3
|
-
"version": "5.0.0-rc.
|
3
|
+
"version": "5.0.0-rc.13",
|
4
4
|
"main": "dist/babylon.guiEditor.max.js",
|
5
5
|
"module": "dist/babylon.guiEditor.max.js",
|
6
6
|
"esnext": "dist/babylon.guiEditor.max.js",
|
@@ -18,8 +18,8 @@
|
|
18
18
|
"clean": "rimraf dist"
|
19
19
|
},
|
20
20
|
"dependencies": {
|
21
|
-
"@babylonjs/core": "^5.0.0-rc.
|
22
|
-
"@babylonjs/gui": "^5.0.0-rc.
|
21
|
+
"@babylonjs/core": "^5.0.0-rc.13",
|
22
|
+
"@babylonjs/gui": "^5.0.0-rc.13"
|
23
23
|
},
|
24
24
|
"peerDependencies": {
|
25
25
|
"@types/react": ">=16.7.3",
|