@babylonjs/gui-editor 5.0.0-alpha.63 → 5.0.0-alpha.64
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/babylon.guiEditor.max.js +782 -158
- package/babylon.guiEditor.max.js.map +1 -1
- package/babylon.guiEditor.module.d.ts +102 -12
- package/package.json +2 -2
@@ -674,6 +674,7 @@ declare module "@babylonjs/gui-editor/diagram/workbench" {
|
|
674
674
|
import { Vector2, Vector3 } from "@babylonjs/core/Maths/math.vector";
|
675
675
|
import { Scene } from "@babylonjs/core/scene";
|
676
676
|
import { ArcRotateCamera } from "@babylonjs/core/Cameras/arcRotateCamera";
|
677
|
+
import { Mesh } from "@babylonjs/core/Meshes/mesh";
|
677
678
|
import { Plane } from "@babylonjs/core/Maths/math.plane";
|
678
679
|
import { PointerInfo } from "@babylonjs/core/Events/pointerEvents";
|
679
680
|
import { EventState } from "@babylonjs/core/Misc/observable";
|
@@ -681,8 +682,6 @@ declare module "@babylonjs/gui-editor/diagram/workbench" {
|
|
681
682
|
export interface IWorkbenchComponentProps {
|
682
683
|
globalState: GlobalState;
|
683
684
|
}
|
684
|
-
export type FramePortData = {};
|
685
|
-
export const isFramePortData: (variableToCheck: any) => variableToCheck is FramePortData;
|
686
685
|
export enum ConstraintDirection {
|
687
686
|
NONE = 0,
|
688
687
|
X = 2,
|
@@ -694,7 +693,7 @@ declare module "@babylonjs/gui-editor/diagram/workbench" {
|
|
694
693
|
private _setConstraintDirection;
|
695
694
|
private _mouseStartPointX;
|
696
695
|
private _mouseStartPointY;
|
697
|
-
|
696
|
+
_textureMesh: Mesh;
|
698
697
|
_scene: Scene;
|
699
698
|
private _selectedGuiNodes;
|
700
699
|
private _ctrlKeyIsPressed;
|
@@ -702,7 +701,6 @@ declare module "@babylonjs/gui-editor/diagram/workbench" {
|
|
702
701
|
private _constraintDirection;
|
703
702
|
private _forcePanning;
|
704
703
|
private _forceZooming;
|
705
|
-
private _forceMoving;
|
706
704
|
private _forceSelecting;
|
707
705
|
private _outlines;
|
708
706
|
private _panning;
|
@@ -711,23 +709,30 @@ declare module "@babylonjs/gui-editor/diagram/workbench" {
|
|
711
709
|
private _isOverGUINode;
|
712
710
|
private _clipboard;
|
713
711
|
private _selectAll;
|
714
|
-
|
712
|
+
_camera: ArcRotateCamera;
|
715
713
|
private _cameraRadias;
|
716
714
|
private _cameraMaxRadiasFactor;
|
717
715
|
private _pasted;
|
718
716
|
private _engine;
|
719
717
|
private _liveRenderObserver;
|
720
718
|
private _guiRenderObserver;
|
719
|
+
private _mainSelection;
|
720
|
+
private _selectionDepth;
|
721
|
+
private _doubleClick;
|
722
|
+
private _lockMainSelection;
|
721
723
|
get globalState(): GlobalState;
|
722
724
|
get nodes(): Control[];
|
723
725
|
get selectedGuiNodes(): Control[];
|
726
|
+
private _getParentWithDepth;
|
727
|
+
private _getMaxParent;
|
724
728
|
constructor(props: IWorkbenchComponentProps);
|
729
|
+
determineMouseSelection(selection: Nullable<Control>): void;
|
725
730
|
keyEvent: (evt: KeyboardEvent) => void;
|
726
731
|
private updateHitTest;
|
727
732
|
private updateHitTestForSelection;
|
728
733
|
private setCameraRadius;
|
729
|
-
|
730
|
-
|
734
|
+
copyToClipboard(): void;
|
735
|
+
pasteFromClipboard(): void;
|
731
736
|
CopyGUIControl(original: Control): void;
|
732
737
|
private selectAllGUI;
|
733
738
|
blurEvent: () => void;
|
@@ -739,6 +744,7 @@ declare module "@babylonjs/gui-editor/diagram/workbench" {
|
|
739
744
|
resizeGuiTexture(newvalue: Vector2): void;
|
740
745
|
findNodeFromGuiElement(guiControl: Control): Control;
|
741
746
|
appendBlock(guiElement: Control): Control;
|
747
|
+
private _isMainSelectionParent;
|
742
748
|
createNewGuiNode(guiControl: Control): Control;
|
743
749
|
private parent;
|
744
750
|
private _convertToPixels;
|
@@ -748,6 +754,7 @@ declare module "@babylonjs/gui-editor/diagram/workbench" {
|
|
748
754
|
isSelected(value: boolean, guiNode: Control): void;
|
749
755
|
clicked: boolean;
|
750
756
|
_onMove(guiControl: Control, evt: Vector2, startPos: Vector2, ignorClick?: boolean): boolean;
|
757
|
+
convertToPercentage(guiControl: Control, includeScale: boolean): void;
|
751
758
|
onMove(evt: React.PointerEvent): void;
|
752
759
|
getGroundPosition(): Nullable<Vector3>;
|
753
760
|
onDown(evt: React.PointerEvent<HTMLElement>): void;
|
@@ -756,7 +763,7 @@ declare module "@babylonjs/gui-editor/diagram/workbench" {
|
|
756
763
|
createGUICanvas(): void;
|
757
764
|
synchronizeLiveGUI(): void;
|
758
765
|
addControls(scene: Scene, camera: ArcRotateCamera): void;
|
759
|
-
getPosition(scene: Scene, camera: ArcRotateCamera, plane: Plane): Vector3;
|
766
|
+
getPosition(scene: Scene, camera: ArcRotateCamera, plane: Plane, x?: number, y?: number): Vector3;
|
760
767
|
panning(newPos: Vector3, initialPos: Vector3, inertia: number, ref: Vector3): Vector3;
|
761
768
|
zoomWheel(p: PointerInfo, e: EventState, camera: ArcRotateCamera): number;
|
762
769
|
zooming(delta: number, scene: Scene, camera: ArcRotateCamera, plane: Plane, ref: Vector3): void;
|
@@ -784,6 +791,82 @@ declare module "@babylonjs/gui-editor/sharedUiComponents/tabs/propertyGrids/lock
|
|
784
791
|
lock: boolean;
|
785
792
|
}
|
786
793
|
}
|
794
|
+
declare module "@babylonjs/gui-editor/diagram/guiGizmo" {
|
795
|
+
import { Control } from "@babylonjs/gui/2D/controls/control";
|
796
|
+
import { Vector2 } from "@babylonjs/core/Maths/math.vector";
|
797
|
+
import * as React from "react";
|
798
|
+
import { GlobalState } from "@babylonjs/gui-editor/globalState";
|
799
|
+
export interface IGuiGizmoProps {
|
800
|
+
globalState: GlobalState;
|
801
|
+
}
|
802
|
+
export class GuiGizmoComponent extends React.Component<IGuiGizmoProps> {
|
803
|
+
scalePoints: HTMLDivElement[];
|
804
|
+
private _scalePointIndex;
|
805
|
+
private _pointerData;
|
806
|
+
private _htmlPoints;
|
807
|
+
private _matrixCache;
|
808
|
+
private _responsive;
|
809
|
+
constructor(props: IGuiGizmoProps);
|
810
|
+
componentDidMount(): void;
|
811
|
+
/**
|
812
|
+
* Update the gizmo's corners positions
|
813
|
+
* @param force should the update be forced. otherwise it will be updated only when the pointer is down
|
814
|
+
*/
|
815
|
+
updateGizmo(force?: boolean): void;
|
816
|
+
private _resetMatrixArray;
|
817
|
+
/**
|
818
|
+
* This function calculates a local matrix for a node, including it's full transformation and pivot point
|
819
|
+
*
|
820
|
+
* @param node the node to calculate the matrix for
|
821
|
+
* @param useStoredValues should the stored (cached) values be used to calculate the matrix
|
822
|
+
* @returns a new matrix for the control
|
823
|
+
*/
|
824
|
+
private _getNodeMatrix;
|
825
|
+
/**
|
826
|
+
* Using the node's tree, calculate its world matrix and return it
|
827
|
+
* @param node the node to calculate the matrix for
|
828
|
+
* @param useStoredValuesIfPossible used stored valued (cached when pointer down is clicked)
|
829
|
+
* @returns the world matrix for this node
|
830
|
+
*/
|
831
|
+
private _nodeToRTTWorldMatrix;
|
832
|
+
private _nodeToRTTSpace;
|
833
|
+
private _rttToLocalNodeSpace;
|
834
|
+
private _rttToCanvasSpace;
|
835
|
+
private _plane;
|
836
|
+
private _mousePointerToRTTSpace;
|
837
|
+
/**
|
838
|
+
* Get the scaling of a specific GUI control
|
839
|
+
* @param node the node for which we are getting the scaling
|
840
|
+
* @param relative should we return only the relative scaling (relative to the parent)
|
841
|
+
* @returns an X,Y vector of the scaling
|
842
|
+
*/
|
843
|
+
getScale(node: Control, relative?: boolean): Vector2;
|
844
|
+
getRotation(node: Control, relative?: boolean): number;
|
845
|
+
createBaseGizmo(): void;
|
846
|
+
onUp(evt?: React.PointerEvent): void;
|
847
|
+
private _onUp;
|
848
|
+
onMove(evt: React.PointerEvent): void;
|
849
|
+
private _initH;
|
850
|
+
private _initW;
|
851
|
+
private _initX;
|
852
|
+
private _initY;
|
853
|
+
private _onMove;
|
854
|
+
/**
|
855
|
+
* Calculate the 4 corners in node space
|
856
|
+
* @param node The node to use
|
857
|
+
*/
|
858
|
+
private _nodeToCorners;
|
859
|
+
/**
|
860
|
+
* Computer the node's width, height, top and left, using the 4 corners
|
861
|
+
* @param node the node we use
|
862
|
+
*/
|
863
|
+
private _updateNodeFromCorners;
|
864
|
+
private _rotate;
|
865
|
+
private _setNodeCorner;
|
866
|
+
private _setMousePosition;
|
867
|
+
render(): null;
|
868
|
+
}
|
869
|
+
}
|
787
870
|
declare module "@babylonjs/gui-editor/globalState" {
|
788
871
|
import { Nullable } from "@babylonjs/core/types";
|
789
872
|
import { Observable } from "@babylonjs/core/Misc/observable";
|
@@ -796,6 +879,7 @@ declare module "@babylonjs/gui-editor/globalState" {
|
|
796
879
|
import { Scene } from "@babylonjs/core/scene";
|
797
880
|
import { Control } from "@babylonjs/gui/2D/controls/control";
|
798
881
|
import { LockObject } from "@babylonjs/gui-editor/sharedUiComponents/tabs/propertyGrids/lockObject";
|
882
|
+
import { GuiGizmoComponent } from "@babylonjs/gui-editor/diagram/guiGizmo";
|
799
883
|
export enum DragOverLocation {
|
800
884
|
ABOVE = 0,
|
801
885
|
BELOW = 1,
|
@@ -826,6 +910,7 @@ declare module "@babylonjs/gui-editor/globalState" {
|
|
826
910
|
controlCamera: boolean;
|
827
911
|
selectionLock: boolean;
|
828
912
|
workbench: WorkbenchComponent;
|
913
|
+
guiGizmo: GuiGizmoComponent;
|
829
914
|
onPropertyChangedObservable: Observable<PropertyChangedEvent>;
|
830
915
|
onZoomObservable: Observable<void>;
|
831
916
|
onFitToWindowObservable: Observable<void>;
|
@@ -843,6 +928,7 @@ declare module "@babylonjs/gui-editor/globalState" {
|
|
843
928
|
onDraggingEndObservable: Observable<void>;
|
844
929
|
onDraggingStartObservable: Observable<void>;
|
845
930
|
onWindowResizeObservable: Observable<void>;
|
931
|
+
onGizmoUpdateRequireObservable: Observable<void>;
|
846
932
|
draggedControl: Nullable<Control>;
|
847
933
|
draggedControlDirection: DragOverLocation;
|
848
934
|
isSaving: boolean;
|
@@ -895,7 +981,7 @@ declare module "@babylonjs/gui-editor/sharedUiComponents/lines/checkBoxLineCompo
|
|
895
981
|
import { Observable } from "@babylonjs/core/Misc/observable";
|
896
982
|
import { PropertyChangedEvent } from "@babylonjs/gui-editor/sharedUiComponents/propertyChangedEvent";
|
897
983
|
export interface ICheckBoxLineComponentProps {
|
898
|
-
label
|
984
|
+
label?: string;
|
899
985
|
target?: any;
|
900
986
|
propertyName?: string;
|
901
987
|
isSelected?: () => boolean;
|
@@ -905,6 +991,8 @@ declare module "@babylonjs/gui-editor/sharedUiComponents/lines/checkBoxLineCompo
|
|
905
991
|
disabled?: boolean;
|
906
992
|
icon?: string;
|
907
993
|
iconLabel?: string;
|
994
|
+
faIcons?: {
|
995
|
+
};
|
908
996
|
}
|
909
997
|
export class CheckBoxLineComponent extends React.Component<ICheckBoxLineComponentProps, {
|
910
998
|
isSelected: boolean;
|
@@ -978,6 +1066,7 @@ declare module "@babylonjs/gui-editor/sharedUiComponents/lines/floatLineComponen
|
|
978
1066
|
onEnter?: (newValue: number) => void;
|
979
1067
|
icon?: string;
|
980
1068
|
iconLabel?: string;
|
1069
|
+
defaultValue?: number;
|
981
1070
|
}
|
982
1071
|
export class FloatLineComponent extends React.Component<IFloatLineComponentProps, {
|
983
1072
|
value: string;
|
@@ -1050,6 +1139,7 @@ declare module "@babylonjs/gui-editor/sharedUiComponents/lines/textInputLineComp
|
|
1050
1139
|
iconLabel?: string;
|
1051
1140
|
noUnderline?: boolean;
|
1052
1141
|
numbersOnly?: boolean;
|
1142
|
+
delayInput?: boolean;
|
1053
1143
|
}
|
1054
1144
|
export class TextInputLineComponent extends React.Component<ITextInputLineComponentProps, {
|
1055
1145
|
value: string;
|
@@ -1269,10 +1359,10 @@ declare module "@babylonjs/gui-editor/components/propertyTab/propertyGrids/gui/c
|
|
1269
1359
|
export class CommonControlPropertyGridComponent extends React.Component<ICommonControlPropertyGridComponentProps> {
|
1270
1360
|
private _width;
|
1271
1361
|
private _height;
|
1272
|
-
private _responsive;
|
1273
1362
|
constructor(props: ICommonControlPropertyGridComponentProps);
|
1274
1363
|
private _updateAlignment;
|
1275
1364
|
private _checkAndUpdateValues;
|
1365
|
+
private _markChildrenAsDirty;
|
1276
1366
|
render(): JSX.Element;
|
1277
1367
|
}
|
1278
1368
|
}
|
@@ -1659,7 +1749,7 @@ declare module "@babylonjs/gui-editor/guiNodeTools" {
|
|
1659
1749
|
import { ImageBasedSlider } from "@babylonjs/gui/2D/controls/sliders/imageBasedSlider";
|
1660
1750
|
export class GUINodeTools {
|
1661
1751
|
static ImageControlDefaultUrl: string;
|
1662
|
-
static CreateControlFromString(data: string): Grid | Rectangle | Line |
|
1752
|
+
static CreateControlFromString(data: string): Grid | Rectangle | Line | Image | TextBlock | Slider | ImageBasedSlider | RadioButton | InputText | ColorPicker | StackPanel | Ellipse | Checkbox | DisplayGrid;
|
1663
1753
|
}
|
1664
1754
|
}
|
1665
1755
|
declare module "@babylonjs/gui-editor/components/propertyTab/propertyTabComponent" {
|
@@ -1933,7 +2023,6 @@ declare module "@babylonjs/gui-editor/components/commandBarComponent" {
|
|
1933
2023
|
private _panning;
|
1934
2024
|
private _zooming;
|
1935
2025
|
private _selecting;
|
1936
|
-
private _moving;
|
1937
2026
|
private _outlines;
|
1938
2027
|
constructor(props: ICommandBarComponentProps);
|
1939
2028
|
private updateNodeOutline;
|
@@ -1956,6 +2045,7 @@ declare module "@babylonjs/gui-editor/workbenchEditor" {
|
|
1956
2045
|
private _rightWidth;
|
1957
2046
|
private _toolBarIconSize;
|
1958
2047
|
private _popUpWindow;
|
2048
|
+
private _draggedItem;
|
1959
2049
|
componentDidMount(): void;
|
1960
2050
|
constructor(props: IGraphEditorProps);
|
1961
2051
|
showWaitScreen(): void;
|
package/package.json
CHANGED
@@ -4,14 +4,14 @@
|
|
4
4
|
},
|
5
5
|
"name": "@babylonjs/gui-editor",
|
6
6
|
"description": "The Babylon.js GUI editor.",
|
7
|
-
"version": "5.0.0-alpha.
|
7
|
+
"version": "5.0.0-alpha.64",
|
8
8
|
"repository": {
|
9
9
|
"type": "git",
|
10
10
|
"url": "https://github.com/BabylonJS/Babylon.js.git"
|
11
11
|
},
|
12
12
|
"license": "Apache-2.0",
|
13
13
|
"dependencies": {
|
14
|
-
"@babylonjs/core": "5.0.0-alpha.
|
14
|
+
"@babylonjs/core": "5.0.0-alpha.64",
|
15
15
|
"tslib": "^2.3.1"
|
16
16
|
},
|
17
17
|
"files": [
|