babylonjs-gui-editor 5.0.0-beta.3 → 5.0.0-beta.4
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.js +6 -6
- package/babylon.guiEditor.max.js +495 -203
- package/babylon.guiEditor.max.js.map +1 -1
- package/babylon.guiEditor.module.d.ts +88 -48
- package/package.json +2 -2
|
@@ -800,17 +800,49 @@ declare module "babylonjs-gui-editor/diagram/guiGizmo" {
|
|
|
800
800
|
export interface IGuiGizmoProps {
|
|
801
801
|
globalState: GlobalState;
|
|
802
802
|
}
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
803
|
+
enum ScalePointPosition {
|
|
804
|
+
Top = -1,
|
|
805
|
+
Left = -1,
|
|
806
|
+
Center = 0,
|
|
807
|
+
Right = 1,
|
|
808
|
+
Bottom = 1
|
|
809
|
+
}
|
|
810
|
+
interface IScalePoint {
|
|
811
|
+
position: Vector2;
|
|
812
|
+
horizontalPosition: ScalePointPosition;
|
|
813
|
+
verticalPosition: ScalePointPosition;
|
|
814
|
+
rotation: number;
|
|
815
|
+
isPivot: boolean;
|
|
816
|
+
}
|
|
817
|
+
class Rect {
|
|
818
|
+
top: number;
|
|
819
|
+
left: number;
|
|
820
|
+
right: number;
|
|
821
|
+
bottom: number;
|
|
822
|
+
constructor(left: number, top: number, right: number, bottom: number);
|
|
823
|
+
get center(): Vector2;
|
|
824
|
+
get width(): number;
|
|
825
|
+
get height(): number;
|
|
826
|
+
}
|
|
827
|
+
interface IGuiGizmoState {
|
|
828
|
+
canvasBounds: Rect;
|
|
829
|
+
scalePoints: IScalePoint[];
|
|
830
|
+
scalePointDragging: number;
|
|
831
|
+
isRotating: boolean;
|
|
832
|
+
}
|
|
833
|
+
export class GuiGizmoComponent extends React.Component<IGuiGizmoProps, IGuiGizmoState> {
|
|
808
834
|
private _matrixCache;
|
|
809
835
|
private _responsive;
|
|
836
|
+
private _initH;
|
|
837
|
+
private _initW;
|
|
838
|
+
private _initX;
|
|
839
|
+
private _initY;
|
|
840
|
+
private _localBounds;
|
|
841
|
+
private _rotation;
|
|
810
842
|
constructor(props: IGuiGizmoProps);
|
|
811
843
|
componentDidMount(): void;
|
|
812
844
|
/**
|
|
813
|
-
* Update the gizmo's
|
|
845
|
+
* Update the gizmo's positions
|
|
814
846
|
* @param force should the update be forced. otherwise it will be updated only when the pointer is down
|
|
815
847
|
*/
|
|
816
848
|
updateGizmo(force?: boolean): void;
|
|
@@ -843,29 +875,17 @@ declare module "babylonjs-gui-editor/diagram/guiGizmo" {
|
|
|
843
875
|
*/
|
|
844
876
|
getScale(node: Control, relative?: boolean): Vector2;
|
|
845
877
|
getRotation(node: Control, relative?: boolean): number;
|
|
846
|
-
createBaseGizmo(): void;
|
|
847
878
|
onUp(evt?: React.PointerEvent): void;
|
|
848
879
|
private _onUp;
|
|
849
880
|
onMove(evt: React.PointerEvent): void;
|
|
850
|
-
private _initH;
|
|
851
|
-
private _initW;
|
|
852
|
-
private _initX;
|
|
853
|
-
private _initY;
|
|
854
881
|
private _onMove;
|
|
855
|
-
/**
|
|
856
|
-
* Calculate the 4 corners in node space
|
|
857
|
-
* @param node The node to use
|
|
858
|
-
*/
|
|
859
|
-
private _nodeToCorners;
|
|
860
|
-
/**
|
|
861
|
-
* Computer the node's width, height, top and left, using the 4 corners
|
|
862
|
-
* @param node the node we use
|
|
863
|
-
*/
|
|
864
|
-
private _updateNodeFromCorners;
|
|
865
882
|
private _rotate;
|
|
866
|
-
private
|
|
867
|
-
private
|
|
868
|
-
|
|
883
|
+
private _computeLocalBounds;
|
|
884
|
+
private _dragLocalBounds;
|
|
885
|
+
private _updateNodeFromLocalBounds;
|
|
886
|
+
private _beginDraggingScalePoint;
|
|
887
|
+
private _beginRotate;
|
|
888
|
+
render(): JSX.Element | null;
|
|
869
889
|
}
|
|
870
890
|
}
|
|
871
891
|
declare module "babylonjs-gui-editor/globalState" {
|
|
@@ -3717,17 +3737,49 @@ declare module GUIEDITOR {
|
|
|
3717
3737
|
export interface IGuiGizmoProps {
|
|
3718
3738
|
globalState: GlobalState;
|
|
3719
3739
|
}
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3740
|
+
enum ScalePointPosition {
|
|
3741
|
+
Top = -1,
|
|
3742
|
+
Left = -1,
|
|
3743
|
+
Center = 0,
|
|
3744
|
+
Right = 1,
|
|
3745
|
+
Bottom = 1
|
|
3746
|
+
}
|
|
3747
|
+
interface IScalePoint {
|
|
3748
|
+
position: BABYLON.Vector2;
|
|
3749
|
+
horizontalPosition: ScalePointPosition;
|
|
3750
|
+
verticalPosition: ScalePointPosition;
|
|
3751
|
+
rotation: number;
|
|
3752
|
+
isPivot: boolean;
|
|
3753
|
+
}
|
|
3754
|
+
class Rect {
|
|
3755
|
+
top: number;
|
|
3756
|
+
left: number;
|
|
3757
|
+
right: number;
|
|
3758
|
+
bottom: number;
|
|
3759
|
+
constructor(left: number, top: number, right: number, bottom: number);
|
|
3760
|
+
get center(): BABYLON.Vector2;
|
|
3761
|
+
get width(): number;
|
|
3762
|
+
get height(): number;
|
|
3763
|
+
}
|
|
3764
|
+
interface IGuiGizmoState {
|
|
3765
|
+
canvasBounds: Rect;
|
|
3766
|
+
scalePoints: IScalePoint[];
|
|
3767
|
+
scalePointDragging: number;
|
|
3768
|
+
isRotating: boolean;
|
|
3769
|
+
}
|
|
3770
|
+
export class GuiGizmoComponent extends React.Component<IGuiGizmoProps, IGuiGizmoState> {
|
|
3725
3771
|
private _matrixCache;
|
|
3726
3772
|
private _responsive;
|
|
3773
|
+
private _initH;
|
|
3774
|
+
private _initW;
|
|
3775
|
+
private _initX;
|
|
3776
|
+
private _initY;
|
|
3777
|
+
private _localBounds;
|
|
3778
|
+
private _rotation;
|
|
3727
3779
|
constructor(props: IGuiGizmoProps);
|
|
3728
3780
|
componentDidMount(): void;
|
|
3729
3781
|
/**
|
|
3730
|
-
* Update the gizmo's
|
|
3782
|
+
* Update the gizmo's positions
|
|
3731
3783
|
* @param force should the update be forced. otherwise it will be updated only when the pointer is down
|
|
3732
3784
|
*/
|
|
3733
3785
|
updateGizmo(force?: boolean): void;
|
|
@@ -3760,29 +3812,17 @@ declare module GUIEDITOR {
|
|
|
3760
3812
|
*/
|
|
3761
3813
|
getScale(node: Control, relative?: boolean): BABYLON.Vector2;
|
|
3762
3814
|
getRotation(node: Control, relative?: boolean): number;
|
|
3763
|
-
createBaseGizmo(): void;
|
|
3764
3815
|
onUp(evt?: React.PointerEvent): void;
|
|
3765
3816
|
private _onUp;
|
|
3766
3817
|
onMove(evt: React.PointerEvent): void;
|
|
3767
|
-
private _initH;
|
|
3768
|
-
private _initW;
|
|
3769
|
-
private _initX;
|
|
3770
|
-
private _initY;
|
|
3771
3818
|
private _onMove;
|
|
3772
|
-
/**
|
|
3773
|
-
* Calculate the 4 corners in node space
|
|
3774
|
-
* @param node The node to use
|
|
3775
|
-
*/
|
|
3776
|
-
private _nodeToCorners;
|
|
3777
|
-
/**
|
|
3778
|
-
* Computer the node's width, height, top and left, using the 4 corners
|
|
3779
|
-
* @param node the node we use
|
|
3780
|
-
*/
|
|
3781
|
-
private _updateNodeFromCorners;
|
|
3782
3819
|
private _rotate;
|
|
3783
|
-
private
|
|
3784
|
-
private
|
|
3785
|
-
|
|
3820
|
+
private _computeLocalBounds;
|
|
3821
|
+
private _dragLocalBounds;
|
|
3822
|
+
private _updateNodeFromLocalBounds;
|
|
3823
|
+
private _beginDraggingScalePoint;
|
|
3824
|
+
private _beginRotate;
|
|
3825
|
+
render(): JSX.Element | null;
|
|
3786
3826
|
}
|
|
3787
3827
|
}
|
|
3788
3828
|
declare module GUIEDITOR {
|
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-beta.
|
|
7
|
+
"version": "5.0.0-beta.4",
|
|
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": "5.0.0-beta.
|
|
14
|
+
"babylonjs": "5.0.0-beta.4"
|
|
15
15
|
},
|
|
16
16
|
"files": [
|
|
17
17
|
"babylon.guiEditor.max.js.map",
|