babylonjs-gui-editor 5.23.0 → 5.25.0
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.d.ts +71 -4
- package/babylon.guiEditor.js +1 -1
- package/babylon.guiEditor.js.map +1 -1
- package/babylon.guiEditor.max.js +284 -83
- package/babylon.guiEditor.max.js.map +1 -1
- package/babylon.guiEditor.module.d.ts +161 -8
- package/package.json +3 -3
package/babylon.guiEditor.d.ts
CHANGED
|
@@ -111,6 +111,8 @@ declare module BABYLON {
|
|
|
111
111
|
lockObject: BABYLON.GuiEditor.SharedUIComponents.LockObject;
|
|
112
112
|
onPropertyChangedObservable?: Observable<BABYLON.GuiEditor.SharedUIComponents.PropertyChangedEvent>;
|
|
113
113
|
onAddComponent: (newComponent: string) => void;
|
|
114
|
+
onFontsParsedObservable?: Observable<void>;
|
|
115
|
+
globalState?: GlobalState;
|
|
114
116
|
}
|
|
115
117
|
export class ButtonPropertyGridComponent extends React.Component<IButtonPropertyGridComponentProps> {
|
|
116
118
|
constructor(props: IButtonPropertyGridComponentProps);
|
|
@@ -122,6 +124,8 @@ declare module BABYLON {
|
|
|
122
124
|
checkboxes: BABYLON.GUI.Checkbox[];
|
|
123
125
|
lockObject: BABYLON.GuiEditor.SharedUIComponents.LockObject;
|
|
124
126
|
onPropertyChangedObservable?: Observable<BABYLON.GuiEditor.SharedUIComponents.PropertyChangedEvent>;
|
|
127
|
+
onFontsParsedObservable?: Observable<void>;
|
|
128
|
+
globalState?: GlobalState;
|
|
125
129
|
}
|
|
126
130
|
export class CheckboxPropertyGridComponent extends React.Component<ICheckboxPropertyGridComponentProps> {
|
|
127
131
|
constructor(props: ICheckboxPropertyGridComponentProps);
|
|
@@ -133,6 +137,8 @@ declare module BABYLON {
|
|
|
133
137
|
colorPickers: BABYLON.GUI.ColorPicker[];
|
|
134
138
|
lockObject: BABYLON.GuiEditor.SharedUIComponents.LockObject;
|
|
135
139
|
onPropertyChangedObservable?: Observable<BABYLON.GuiEditor.SharedUIComponents.PropertyChangedEvent>;
|
|
140
|
+
onFontsParsedObservable?: Observable<void>;
|
|
141
|
+
globalState?: GlobalState;
|
|
136
142
|
}
|
|
137
143
|
export class ColorPickerPropertyGridComponent extends React.Component<IColorPickerPropertyGridComponentProps> {
|
|
138
144
|
constructor(props: IColorPickerPropertyGridComponentProps);
|
|
@@ -145,14 +151,29 @@ declare module BABYLON {
|
|
|
145
151
|
lockObject: BABYLON.GuiEditor.SharedUIComponents.LockObject;
|
|
146
152
|
onPropertyChangedObservable?: Observable<BABYLON.GuiEditor.SharedUIComponents.PropertyChangedEvent>;
|
|
147
153
|
hideDimensions?: boolean;
|
|
154
|
+
onFontsParsedObservable?: Observable<void>;
|
|
155
|
+
globalState?: GlobalState;
|
|
148
156
|
}
|
|
149
|
-
|
|
157
|
+
interface ICommonControlPropertyGridComponentState {
|
|
158
|
+
fontFamilyOptions: IInspectableOptions[];
|
|
159
|
+
value: number;
|
|
160
|
+
}
|
|
161
|
+
export class CommonControlPropertyGridComponent extends React.Component<ICommonControlPropertyGridComponentProps, ICommonControlPropertyGridComponentState> {
|
|
150
162
|
private _onPropertyChangedObserver;
|
|
163
|
+
private _onFontsParsedObserver;
|
|
151
164
|
constructor(props: ICommonControlPropertyGridComponentProps);
|
|
165
|
+
componentWillMount(): void;
|
|
166
|
+
private _checkFontsInLayout;
|
|
152
167
|
private _getTransformedReferenceCoordinate;
|
|
153
168
|
private _updateAlignment;
|
|
154
169
|
private _checkAndUpdateValues;
|
|
155
170
|
private _markChildrenAsDirty;
|
|
171
|
+
addVal: (newVal: {
|
|
172
|
+
label: string;
|
|
173
|
+
value: number;
|
|
174
|
+
}, prevVal: number) => void;
|
|
175
|
+
selectCustomVal(): void;
|
|
176
|
+
keepPrevVal(prevVal: number): void;
|
|
156
177
|
componentWillUnmount(): void;
|
|
157
178
|
render(): JSX.Element;
|
|
158
179
|
}
|
|
@@ -171,6 +192,8 @@ declare module BABYLON {
|
|
|
171
192
|
controls: BABYLON.GUI.Control[];
|
|
172
193
|
lockObject: BABYLON.GuiEditor.SharedUIComponents.LockObject;
|
|
173
194
|
onPropertyChangedObservable?: Observable<BABYLON.GuiEditor.SharedUIComponents.PropertyChangedEvent>;
|
|
195
|
+
onFontsParsedObservable?: Observable<void>;
|
|
196
|
+
globalState?: GlobalState;
|
|
174
197
|
}
|
|
175
198
|
export class ControlPropertyGridComponent extends React.Component<IControlPropertyGridComponentProps> {
|
|
176
199
|
constructor(props: IControlPropertyGridComponentProps);
|
|
@@ -182,6 +205,8 @@ declare module BABYLON {
|
|
|
182
205
|
displayGrids: BABYLON.GUI.DisplayGrid[];
|
|
183
206
|
lockObject: BABYLON.GuiEditor.SharedUIComponents.LockObject;
|
|
184
207
|
onPropertyChangedObservable?: Observable<BABYLON.GuiEditor.SharedUIComponents.PropertyChangedEvent>;
|
|
208
|
+
onFontsParsedObservable?: Observable<void>;
|
|
209
|
+
globalState?: GlobalState;
|
|
185
210
|
}
|
|
186
211
|
export class DisplayGridPropertyGridComponent extends React.Component<IDisplayGridPropertyGridComponentProps> {
|
|
187
212
|
constructor(props: IDisplayGridPropertyGridComponentProps);
|
|
@@ -193,6 +218,8 @@ declare module BABYLON {
|
|
|
193
218
|
ellipses: BABYLON.GUI.Ellipse[];
|
|
194
219
|
lockObject: BABYLON.GuiEditor.SharedUIComponents.LockObject;
|
|
195
220
|
onPropertyChangedObservable?: Observable<BABYLON.GuiEditor.SharedUIComponents.PropertyChangedEvent>;
|
|
221
|
+
onFontsParsedObservable?: Observable<void>;
|
|
222
|
+
globalState?: GlobalState;
|
|
196
223
|
}
|
|
197
224
|
export class EllipsePropertyGridComponent extends React.Component<IEllipsePropertyGridComponentProps> {
|
|
198
225
|
constructor(props: IEllipsePropertyGridComponentProps);
|
|
@@ -204,6 +231,8 @@ declare module BABYLON {
|
|
|
204
231
|
grids: BABYLON.GUI.Grid[];
|
|
205
232
|
lockObject: BABYLON.GuiEditor.SharedUIComponents.LockObject;
|
|
206
233
|
onPropertyChangedObservable?: Observable<BABYLON.GuiEditor.SharedUIComponents.PropertyChangedEvent>;
|
|
234
|
+
onFontsParsedObservable?: Observable<void>;
|
|
235
|
+
globalState?: GlobalState;
|
|
207
236
|
onUpdateRequiredObservable?: Observable<void>;
|
|
208
237
|
}
|
|
209
238
|
export class GridPropertyGridComponent extends React.Component<IGridPropertyGridComponentProps> {
|
|
@@ -236,6 +265,8 @@ declare module BABYLON {
|
|
|
236
265
|
imageBasedSliders: BABYLON.GUI.ImageBasedSlider[];
|
|
237
266
|
lockObject: BABYLON.GuiEditor.SharedUIComponents.LockObject;
|
|
238
267
|
onPropertyChangedObservable?: Observable<BABYLON.GuiEditor.SharedUIComponents.PropertyChangedEvent>;
|
|
268
|
+
onFontsParsedObservable?: Observable<void>;
|
|
269
|
+
globalState?: GlobalState;
|
|
239
270
|
}
|
|
240
271
|
export class ImageBasedSliderPropertyGridComponent extends React.Component<IImageBasedSliderPropertyGridComponentProps> {
|
|
241
272
|
constructor(props: IImageBasedSliderPropertyGridComponentProps);
|
|
@@ -247,6 +278,8 @@ declare module BABYLON {
|
|
|
247
278
|
images: BABYLON.GUI.Image[];
|
|
248
279
|
lockObject: BABYLON.GuiEditor.SharedUIComponents.LockObject;
|
|
249
280
|
onPropertyChangedObservable?: Observable<BABYLON.GuiEditor.SharedUIComponents.PropertyChangedEvent>;
|
|
281
|
+
onFontsParsedObservable?: Observable<void>;
|
|
282
|
+
globalState?: GlobalState;
|
|
250
283
|
}
|
|
251
284
|
export class ImagePropertyGridComponent extends React.Component<IImagePropertyGridComponentProps> {
|
|
252
285
|
private _observers;
|
|
@@ -265,6 +298,8 @@ declare module BABYLON {
|
|
|
265
298
|
inputTexts: BABYLON.GUI.InputText[];
|
|
266
299
|
lockObject: BABYLON.GuiEditor.SharedUIComponents.LockObject;
|
|
267
300
|
onPropertyChangedObservable?: Observable<BABYLON.GuiEditor.SharedUIComponents.PropertyChangedEvent>;
|
|
301
|
+
onFontsParsedObservable?: Observable<void>;
|
|
302
|
+
globalState?: GlobalState;
|
|
268
303
|
}
|
|
269
304
|
export class InputTextPropertyGridComponent extends React.Component<IInputTextPropertyGridComponentProps> {
|
|
270
305
|
constructor(props: IInputTextPropertyGridComponentProps);
|
|
@@ -276,6 +311,8 @@ declare module BABYLON {
|
|
|
276
311
|
lines: BABYLON.GUI.Line[];
|
|
277
312
|
lockObject: BABYLON.GuiEditor.SharedUIComponents.LockObject;
|
|
278
313
|
onPropertyChangedObservable?: Observable<BABYLON.GuiEditor.SharedUIComponents.PropertyChangedEvent>;
|
|
314
|
+
onFontsParsedObservable?: Observable<void>;
|
|
315
|
+
globalState?: GlobalState;
|
|
279
316
|
}
|
|
280
317
|
export class LinePropertyGridComponent extends React.Component<ILinePropertyGridComponentProps> {
|
|
281
318
|
constructor(props: ILinePropertyGridComponentProps);
|
|
@@ -288,6 +325,8 @@ declare module BABYLON {
|
|
|
288
325
|
radioButtons: BABYLON.GUI.RadioButton[];
|
|
289
326
|
lockObject: BABYLON.GuiEditor.SharedUIComponents.LockObject;
|
|
290
327
|
onPropertyChangedObservable?: Observable<BABYLON.GuiEditor.SharedUIComponents.PropertyChangedEvent>;
|
|
328
|
+
onFontsParsedObservable?: Observable<void>;
|
|
329
|
+
globalState?: GlobalState;
|
|
291
330
|
}
|
|
292
331
|
export class RadioButtonPropertyGridComponent extends React.Component<IRadioButtonPropertyGridComponentProps> {
|
|
293
332
|
constructor(props: IRadioButtonPropertyGridComponentProps);
|
|
@@ -299,6 +338,8 @@ declare module BABYLON {
|
|
|
299
338
|
rectangles: BABYLON.GUI.Rectangle[];
|
|
300
339
|
lockObject: BABYLON.GuiEditor.SharedUIComponents.LockObject;
|
|
301
340
|
onPropertyChangedObservable?: Observable<BABYLON.GuiEditor.SharedUIComponents.PropertyChangedEvent>;
|
|
341
|
+
onFontsParsedObservable?: Observable<void>;
|
|
342
|
+
globalState?: GlobalState;
|
|
302
343
|
}
|
|
303
344
|
export class RectanglePropertyGridComponent extends React.Component<IRectanglePropertyGridComponentProps> {
|
|
304
345
|
constructor(props: IRectanglePropertyGridComponentProps);
|
|
@@ -310,6 +351,8 @@ declare module BABYLON {
|
|
|
310
351
|
scrollViewers: BABYLON.GUI.ScrollViewer[];
|
|
311
352
|
lockObject: BABYLON.GuiEditor.SharedUIComponents.LockObject;
|
|
312
353
|
onPropertyChangedObservable?: Observable<BABYLON.GuiEditor.SharedUIComponents.PropertyChangedEvent>;
|
|
354
|
+
onFontsParsedObservable?: Observable<void>;
|
|
355
|
+
globalState?: GlobalState;
|
|
313
356
|
}
|
|
314
357
|
export class ScrollViewerPropertyGridComponent extends React.Component<IScrollViewerPropertyGridComponentProps> {
|
|
315
358
|
constructor(props: IScrollViewerPropertyGridComponentProps);
|
|
@@ -321,6 +364,8 @@ declare module BABYLON {
|
|
|
321
364
|
sliders: BABYLON.GUI.Slider[];
|
|
322
365
|
lockObject: BABYLON.GuiEditor.SharedUIComponents.LockObject;
|
|
323
366
|
onPropertyChangedObservable?: Observable<BABYLON.GuiEditor.SharedUIComponents.PropertyChangedEvent>;
|
|
367
|
+
onFontsParsedObservable?: Observable<void>;
|
|
368
|
+
globalState?: GlobalState;
|
|
324
369
|
}
|
|
325
370
|
export class SliderGenericPropertyGridComponent extends React.Component<ISliderGenericPropertyGridComponentProps> {
|
|
326
371
|
constructor(props: ISliderGenericPropertyGridComponentProps);
|
|
@@ -343,6 +388,8 @@ declare module BABYLON {
|
|
|
343
388
|
stackPanels: BABYLON.GUI.StackPanel[];
|
|
344
389
|
lockObject: BABYLON.GuiEditor.SharedUIComponents.LockObject;
|
|
345
390
|
onPropertyChangedObservable?: Observable<BABYLON.GuiEditor.SharedUIComponents.PropertyChangedEvent>;
|
|
391
|
+
onFontsParsedObservable?: Observable<void>;
|
|
392
|
+
globalState?: GlobalState;
|
|
346
393
|
}
|
|
347
394
|
export class StackPanelPropertyGridComponent extends React.Component<IStackPanelPropertyGridComponentProps> {
|
|
348
395
|
constructor(props: IStackPanelPropertyGridComponentProps);
|
|
@@ -354,6 +401,8 @@ declare module BABYLON {
|
|
|
354
401
|
textBlocks: BABYLON.GUI.TextBlock[];
|
|
355
402
|
lockObject: BABYLON.GuiEditor.SharedUIComponents.LockObject;
|
|
356
403
|
onPropertyChangedObservable?: Observable<BABYLON.GuiEditor.SharedUIComponents.PropertyChangedEvent>;
|
|
404
|
+
onFontsParsedObservable?: Observable<void>;
|
|
405
|
+
globalState?: GlobalState;
|
|
357
406
|
}
|
|
358
407
|
export class TextBlockPropertyGridComponent extends React.Component<ITextBlockPropertyGridComponentProps> {
|
|
359
408
|
constructor(props: ITextBlockPropertyGridComponentProps);
|
|
@@ -626,7 +675,7 @@ declare module BABYLON {
|
|
|
626
675
|
static NodeToRTTSpace(node: BABYLON.GUI.Control, x: number, y: number, reference?: Vector2, storedValues?: Rect, stopAt?: BABYLON.GUI.Control): Vector2;
|
|
627
676
|
static RttToLocalNodeSpace(node: BABYLON.GUI.Control, x: number, y: number, reference?: Vector2, storedValues?: Rect): Vector2;
|
|
628
677
|
static RttToCanvasSpace(x: number, y: number): Vector2;
|
|
629
|
-
static MousePointerToRTTSpace(
|
|
678
|
+
static MousePointerToRTTSpace(_node?: BABYLON.GUI.Control, x?: number, y?: number): Vector2;
|
|
630
679
|
private static _ResetMatrixArray;
|
|
631
680
|
static ComputeLocalBounds(node: BABYLON.GUI.Control): Rect;
|
|
632
681
|
/**
|
|
@@ -733,6 +782,7 @@ declare module BABYLON {
|
|
|
733
782
|
Y = 3
|
|
734
783
|
}
|
|
735
784
|
export class WorkbenchComponent extends React.Component<IWorkbenchComponentProps> {
|
|
785
|
+
private _mouseDown;
|
|
736
786
|
private _rootContainer;
|
|
737
787
|
private _setConstraintDirection;
|
|
738
788
|
private _mouseStartPoint;
|
|
@@ -745,12 +795,14 @@ declare module BABYLON {
|
|
|
745
795
|
private _guiRenderObserver;
|
|
746
796
|
private _doubleClick;
|
|
747
797
|
_liveGuiTextureRerender: boolean;
|
|
798
|
+
private _currLeft;
|
|
799
|
+
private _currTop;
|
|
748
800
|
private _controlsHit;
|
|
749
801
|
private _pointerTravelDistance;
|
|
750
802
|
private _processSelectionOnUp;
|
|
751
803
|
private _visibleRegionContainer;
|
|
752
|
-
private
|
|
753
|
-
|
|
804
|
+
private static _addedFonts;
|
|
805
|
+
static get addedFonts(): string[];
|
|
754
806
|
get visibleRegionContainer(): BABYLON.GUI.Container;
|
|
755
807
|
private _panAndZoomContainer;
|
|
756
808
|
get panAndZoomContainer(): BABYLON.GUI.Container;
|
|
@@ -816,6 +868,7 @@ declare module BABYLON {
|
|
|
816
868
|
panning(): void;
|
|
817
869
|
moveControls(moveHorizontal: boolean, amount: number): void;
|
|
818
870
|
zoomWheel(event: React.WheelEvent): void;
|
|
871
|
+
zoomDrag(event: React.MouseEvent): void;
|
|
819
872
|
zooming(delta: number): void;
|
|
820
873
|
zeroIfClose(vec: Vector3): void;
|
|
821
874
|
render(): JSX.Element;
|
|
@@ -865,10 +918,13 @@ declare module BABYLON {
|
|
|
865
918
|
workbench: WorkbenchComponent;
|
|
866
919
|
onPropertyChangedObservable: Observable<BABYLON.GuiEditor.SharedUIComponents.PropertyChangedEvent>;
|
|
867
920
|
private _tool;
|
|
921
|
+
private _usePrevSelected;
|
|
868
922
|
private _prevTool;
|
|
869
923
|
onToolChangeObservable: Observable<void>;
|
|
870
924
|
get tool(): GUIEditorTool;
|
|
871
925
|
set tool(newTool: GUIEditorTool);
|
|
926
|
+
get usePrevSelected(): boolean;
|
|
927
|
+
set usePrevSelected(val: boolean);
|
|
872
928
|
restorePreviousTool(): void;
|
|
873
929
|
onFitControlsToWindowObservable: Observable<void>;
|
|
874
930
|
onReframeWindowObservable: Observable<void>;
|
|
@@ -886,6 +942,7 @@ declare module BABYLON {
|
|
|
886
942
|
onGizmoUpdateRequireObservable: Observable<void>;
|
|
887
943
|
onArtBoardUpdateRequiredObservable: Observable<void>;
|
|
888
944
|
onBackgroundColorChangeObservable: Observable<void>;
|
|
945
|
+
onFontsParsedObservable: Observable<void>;
|
|
889
946
|
onPointerMoveObservable: Observable<import("react").PointerEvent<HTMLCanvasElement>>;
|
|
890
947
|
onPointerUpObservable: Observable<Nullable<PointerEvent | import("react").PointerEvent<HTMLCanvasElement>>>;
|
|
891
948
|
draggedControl: Nullable<BABYLON.GUI.Control>;
|
|
@@ -1836,9 +1893,14 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
|
|
|
1836
1893
|
target: any;
|
|
1837
1894
|
propertyName: string;
|
|
1838
1895
|
options: IInspectableOptions[];
|
|
1896
|
+
addInput?: boolean;
|
|
1839
1897
|
noDirectUpdate?: boolean;
|
|
1840
1898
|
onSelect?: (value: number | string) => void;
|
|
1841
1899
|
extractValue?: (target: any) => number | string;
|
|
1900
|
+
addVal?: (newVal: {
|
|
1901
|
+
label: string;
|
|
1902
|
+
value: number;
|
|
1903
|
+
}, prevVal: number) => void;
|
|
1842
1904
|
onPropertyChangedObservable?: Observable<BABYLON.GuiEditor.SharedUIComponents.PropertyChangedEvent>;
|
|
1843
1905
|
allowNullValue?: boolean;
|
|
1844
1906
|
icon?: string;
|
|
@@ -1846,9 +1908,12 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
|
|
|
1846
1908
|
className?: string;
|
|
1847
1909
|
valuesAreStrings?: boolean;
|
|
1848
1910
|
defaultIfNull?: number;
|
|
1911
|
+
fromFontDropdown?: boolean;
|
|
1912
|
+
valueProp?: number;
|
|
1849
1913
|
}
|
|
1850
1914
|
export class OptionsLineComponent extends React.Component<IOptionsLineComponentProps, {
|
|
1851
1915
|
value: number | string;
|
|
1916
|
+
addCustom: boolean;
|
|
1852
1917
|
}> {
|
|
1853
1918
|
private _localChange;
|
|
1854
1919
|
private _remapValueIn;
|
|
@@ -1857,10 +1922,12 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
|
|
|
1857
1922
|
constructor(props: IOptionsLineComponentProps);
|
|
1858
1923
|
shouldComponentUpdate(nextProps: IOptionsLineComponentProps, nextState: {
|
|
1859
1924
|
value: number;
|
|
1925
|
+
addCustom: boolean;
|
|
1860
1926
|
}): boolean;
|
|
1861
1927
|
raiseOnPropertyChanged(newValue: number, previousValue: number): void;
|
|
1862
1928
|
setValue(value: string | number): void;
|
|
1863
1929
|
updateValue(valueString: string): void;
|
|
1930
|
+
updateCustomValue(): void;
|
|
1864
1931
|
render(): JSX.Element;
|
|
1865
1932
|
}
|
|
1866
1933
|
|