babylonjs-gui-editor 5.24.0 → 5.26.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.
@@ -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
- export class CommonControlPropertyGridComponent extends React.Component<ICommonControlPropertyGridComponentProps> {
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(node: BABYLON.GUI.Control, x?: number, y?: number): Vector2;
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 _currLeft;
753
- private _currTop;
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>;
@@ -1163,6 +1220,76 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
1163
1220
 
1164
1221
 
1165
1222
 
1223
+ }
1224
+ declare module BABYLON {
1225
+
1226
+ }
1227
+ declare module BABYLON.GuiEditor.SharedUIComponents {
1228
+ export interface ICommandBarComponentProps {
1229
+ onSaveButtonClicked?: () => void;
1230
+ onSaveToSnippetButtonClicked?: () => void;
1231
+ onLoadFromSnippetButtonClicked?: () => void;
1232
+ onHelpButtonClicked?: () => void;
1233
+ onGiveFeedbackButtonClicked?: () => void;
1234
+ onSelectButtonClicked?: () => void;
1235
+ onPanButtonClicked?: () => void;
1236
+ onZoomButtonClicked?: () => void;
1237
+ onFitButtonClicked?: () => void;
1238
+ }
1239
+ export var CommandBarComponent: React.FC<ICommandBarComponentProps>;
1240
+
1241
+
1242
+
1243
+ }
1244
+ declare module BABYLON {
1245
+
1246
+ }
1247
+ declare module BABYLON.GuiEditor.SharedUIComponents {
1248
+ export interface ICommandButtonComponentProps {
1249
+ tooltip: string;
1250
+ shortcut?: string;
1251
+ icon: string;
1252
+ iconLabel?: string;
1253
+ isActive: boolean;
1254
+ onClick: () => void;
1255
+ disabled?: boolean;
1256
+ }
1257
+ export var CommandButtonComponent: React.FC<ICommandButtonComponentProps>;
1258
+
1259
+
1260
+
1261
+ }
1262
+ declare module BABYLON {
1263
+
1264
+ }
1265
+ declare module BABYLON.GuiEditor.SharedUIComponents {
1266
+ interface ICommandDropdownComponentProps {
1267
+ icon?: string;
1268
+ tooltip: string;
1269
+ defaultValue?: string;
1270
+ items: {
1271
+ label: string;
1272
+ icon?: string;
1273
+ fileButton?: boolean;
1274
+ onClick?: () => void;
1275
+ onCheck?: (value: boolean) => void;
1276
+ storeKey?: string;
1277
+ isActive?: boolean;
1278
+ defaultValue?: boolean | string;
1279
+ subItems?: string[];
1280
+ }[];
1281
+ toRight?: boolean;
1282
+ }
1283
+ export class CommandDropdownComponent extends React.Component<ICommandDropdownComponentProps, {
1284
+ isExpanded: boolean;
1285
+ activeState: string;
1286
+ }> {
1287
+ constructor(props: ICommandDropdownComponentProps);
1288
+ render(): JSX.Element;
1289
+ }
1290
+
1291
+
1292
+
1166
1293
  }
1167
1294
  declare module BABYLON {
1168
1295
 
@@ -1187,6 +1314,7 @@ declare module BABYLON {
1187
1314
  }
1188
1315
  declare module BABYLON.GuiEditor.SharedUIComponents {
1189
1316
  export function ClassNames(names: any, styleObject: any): string;
1317
+ export function JoinClassNames(styleObject: any, ...names: string[]): string;
1190
1318
 
1191
1319
 
1192
1320
 
@@ -1218,6 +1346,29 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
1218
1346
 
1219
1347
 
1220
1348
 
1349
+ }
1350
+ declare module BABYLON {
1351
+
1352
+ }
1353
+ declare module BABYLON.GuiEditor.SharedUIComponents {
1354
+ export interface IFileButtonLineComponentProps {
1355
+ label: string;
1356
+ onClick: (file: File) => void;
1357
+ accept: string;
1358
+ icon?: string;
1359
+ iconLabel?: string;
1360
+ }
1361
+ export class FileButtonLineComponent extends React.Component<IFileButtonLineComponentProps> {
1362
+ private static _IDGenerator;
1363
+ private _id;
1364
+ private _uploadInputRef;
1365
+ constructor(props: IFileButtonLineComponentProps);
1366
+ onChange(evt: any): void;
1367
+ render(): JSX.Element;
1368
+ }
1369
+
1370
+
1371
+
1221
1372
  }
1222
1373
  declare module BABYLON {
1223
1374
 
@@ -1836,9 +1987,14 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
1836
1987
  target: any;
1837
1988
  propertyName: string;
1838
1989
  options: IInspectableOptions[];
1990
+ addInput?: boolean;
1839
1991
  noDirectUpdate?: boolean;
1840
1992
  onSelect?: (value: number | string) => void;
1841
1993
  extractValue?: (target: any) => number | string;
1994
+ addVal?: (newVal: {
1995
+ label: string;
1996
+ value: number;
1997
+ }, prevVal: number) => void;
1842
1998
  onPropertyChangedObservable?: Observable<BABYLON.GuiEditor.SharedUIComponents.PropertyChangedEvent>;
1843
1999
  allowNullValue?: boolean;
1844
2000
  icon?: string;
@@ -1846,9 +2002,13 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
1846
2002
  className?: string;
1847
2003
  valuesAreStrings?: boolean;
1848
2004
  defaultIfNull?: number;
2005
+ fromFontDropdown?: boolean;
2006
+ valueProp?: number;
2007
+ fallbackValue?: number;
1849
2008
  }
1850
2009
  export class OptionsLineComponent extends React.Component<IOptionsLineComponentProps, {
1851
2010
  value: number | string;
2011
+ addCustom: boolean;
1852
2012
  }> {
1853
2013
  private _localChange;
1854
2014
  private _remapValueIn;
@@ -1857,10 +2017,12 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
1857
2017
  constructor(props: IOptionsLineComponentProps);
1858
2018
  shouldComponentUpdate(nextProps: IOptionsLineComponentProps, nextState: {
1859
2019
  value: number;
2020
+ addCustom: boolean;
1860
2021
  }): boolean;
1861
2022
  raiseOnPropertyChanged(newValue: number, previousValue: number): void;
1862
2023
  setValue(value: string | number): void;
1863
2024
  updateValue(valueString: string): void;
2025
+ updateCustomValue(): void;
1864
2026
  render(): JSX.Element;
1865
2027
  }
1866
2028
 
@@ -2897,6 +3059,32 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
2897
3059
 
2898
3060
 
2899
3061
 
3062
+ }
3063
+ declare module BABYLON {
3064
+
3065
+ }
3066
+ declare module BABYLON.GuiEditor.SharedUIComponents {
3067
+ /// <reference types="react" />
3068
+ var _default: {
3069
+ component: ICommandBarComponentProps>;
3070
+ };
3071
+ export var Default: {};
3072
+
3073
+
3074
+
3075
+ }
3076
+ declare module BABYLON {
3077
+
3078
+ }
3079
+ declare module BABYLON.GuiEditor.SharedUIComponents {
3080
+ /// <reference types="react" />
3081
+ var _default: {
3082
+ component: ICommandButtonComponentProps>;
3083
+ };
3084
+ export var Default: {};
3085
+
3086
+
3087
+
2900
3088
  }
2901
3089
  declare module BABYLON {
2902
3090
 
@@ -2942,6 +3130,18 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
2942
3130
 
2943
3131
 
2944
3132
 
3133
+ }
3134
+ declare module BABYLON {
3135
+
3136
+ }
3137
+ declare module BABYLON.GuiEditor.SharedUIComponents {
3138
+ var _default: {
3139
+ component: typeof BABYLON.GuiEditor.SharedUIComponents.FileButtonLineComponent;
3140
+ };
3141
+ export var Default: {};
3142
+
3143
+
3144
+
2945
3145
  }
2946
3146
  declare module BABYLON {
2947
3147