babylonjs-gui-editor 5.13.3 → 5.15.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.
@@ -6,6 +6,7 @@ declare module BABYLON {
6
6
  export class CommandBarComponent extends React.Component<ICommandBarComponentProps> {
7
7
  private _sizeOption;
8
8
  private _stopUpdating;
9
+ private _lockObject;
9
10
  constructor(props: ICommandBarComponentProps);
10
11
  render(): JSX.Element;
11
12
  }
@@ -657,7 +658,6 @@ declare module BABYLON {
657
658
  componentWillUnmount(): void;
658
659
  /**
659
660
  * Update the gizmo's positions
660
- * @param force should the update be forced. otherwise it will be updated only when the pointer is down
661
661
  */
662
662
  updateGizmo(): void;
663
663
  private _onUp;
@@ -1063,10 +1063,13 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
1063
1063
  min?: number;
1064
1064
  onChange: (value: number) => void;
1065
1065
  disabled?: boolean;
1066
+ lockObject: BABYLON.GuiEditor.SharedUIComponents.LockObject;
1066
1067
  }
1067
1068
  export class ColorComponentEntry extends React.Component<IColorComponentEntryProps> {
1068
1069
  constructor(props: IColorComponentEntryProps);
1069
1070
  updateValue(valueString: string): void;
1071
+ lock(): void;
1072
+ unlock(): void;
1070
1073
  render(): JSX.Element;
1071
1074
  }
1072
1075
 
@@ -1085,6 +1088,7 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
1085
1088
  linearhint?: boolean;
1086
1089
  debugMode?: boolean;
1087
1090
  onColorChanged?: (color: Color3 | Color4) => void;
1091
+ lockObject: BABYLON.GuiEditor.SharedUIComponents.LockObject;
1088
1092
  }
1089
1093
  /**
1090
1094
  * Interface used to specify creation options for color picker
@@ -1127,6 +1131,7 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
1127
1131
  value: string;
1128
1132
  expectedLength: number;
1129
1133
  onChange: (value: string) => void;
1134
+ lockObject: BABYLON.GuiEditor.SharedUIComponents.LockObject;
1130
1135
  }
1131
1136
  export class HexColor extends React.Component<IHexColorProps, {
1132
1137
  hex: string;
@@ -1135,6 +1140,8 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
1135
1140
  shouldComponentUpdate(nextProps: IHexColorProps, nextState: {
1136
1141
  hex: string;
1137
1142
  }): boolean;
1143
+ lock(): void;
1144
+ unlock(): void;
1138
1145
  updateHexValue(valueString: string): void;
1139
1146
  render(): JSX.Element;
1140
1147
  }
@@ -1301,7 +1308,7 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
1301
1308
  onPropertyChangedObservable?: Observable<BABYLON.GuiEditor.SharedUIComponents.PropertyChangedEvent>;
1302
1309
  isLinear?: boolean;
1303
1310
  icon?: string;
1304
- lockObject?: BABYLON.GuiEditor.SharedUIComponents.LockObject;
1311
+ lockObject: BABYLON.GuiEditor.SharedUIComponents.LockObject;
1305
1312
  iconLabel?: string;
1306
1313
  onChange?: () => void;
1307
1314
  }
@@ -1325,7 +1332,7 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
1325
1332
  isLinear?: boolean;
1326
1333
  icon?: string;
1327
1334
  iconLabel?: string;
1328
- lockObject?: BABYLON.GuiEditor.SharedUIComponents.LockObject;
1335
+ lockObject: BABYLON.GuiEditor.SharedUIComponents.LockObject;
1329
1336
  }
1330
1337
  export class Color4LineComponent extends React.Component<IColor4LineComponentProps> {
1331
1338
  render(): JSX.Element;
@@ -1347,8 +1354,8 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
1347
1354
  isLinear?: boolean;
1348
1355
  icon?: string;
1349
1356
  iconLabel?: string;
1350
- lockObject?: BABYLON.GuiEditor.SharedUIComponents.LockObject;
1351
1357
  disableAlpha?: boolean;
1358
+ lockObject: BABYLON.GuiEditor.SharedUIComponents.LockObject;
1352
1359
  }
1353
1360
  interface IColorLineComponentState {
1354
1361
  isExpanded: boolean;
@@ -1387,6 +1394,7 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
1387
1394
  icon?: string;
1388
1395
  iconLabel?: string;
1389
1396
  shouldPopRight?: boolean;
1397
+ lockObject?: BABYLON.GuiEditor.SharedUIComponents.LockObject;
1390
1398
  }
1391
1399
  interface IColorPickerComponentState {
1392
1400
  pickerEnabled: boolean;
@@ -1480,7 +1488,7 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
1480
1488
  label: string;
1481
1489
  target: any;
1482
1490
  propertyName: string;
1483
- lockObject?: BABYLON.GuiEditor.SharedUIComponents.LockObject;
1491
+ lockObject: BABYLON.GuiEditor.SharedUIComponents.LockObject;
1484
1492
  onChange?: (newValue: number) => void;
1485
1493
  isInteger?: boolean;
1486
1494
  onPropertyChangedObservable?: Observable<BABYLON.GuiEditor.SharedUIComponents.PropertyChangedEvent>;
@@ -1712,6 +1720,7 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
1712
1720
  onModeChange?: (mode: number) => void;
1713
1721
  onPropertyChangedObservable?: Observable<BABYLON.GuiEditor.SharedUIComponents.PropertyChangedEvent>;
1714
1722
  mode?: number;
1723
+ lockObject: BABYLON.GuiEditor.SharedUIComponents.LockObject;
1715
1724
  }
1716
1725
  export class MatrixLineComponent extends React.Component<IMatrixLineComponentProps, {
1717
1726
  value: Matrix;
@@ -1764,6 +1773,7 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
1764
1773
  precision?: number;
1765
1774
  icon?: string;
1766
1775
  iconLabel?: string;
1776
+ lockObject: BABYLON.GuiEditor.SharedUIComponents.LockObject;
1767
1777
  }
1768
1778
  export class NumericInputComponent extends React.Component<INumericInputComponentProps, {
1769
1779
  value: string;
@@ -1773,6 +1783,7 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
1773
1783
  };
1774
1784
  private _localChange;
1775
1785
  constructor(props: INumericInputComponentProps);
1786
+ componentWillUnmount(): void;
1776
1787
  shouldComponentUpdate(nextProps: INumericInputComponentProps, nextState: {
1777
1788
  value: string;
1778
1789
  }): boolean;
@@ -1883,7 +1894,7 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
1883
1894
  margin?: boolean;
1884
1895
  icon?: string;
1885
1896
  iconLabel?: string;
1886
- lockObject?: BABYLON.GuiEditor.SharedUIComponents.LockObject;
1897
+ lockObject: BABYLON.GuiEditor.SharedUIComponents.LockObject;
1887
1898
  unit?: React.ReactNode;
1888
1899
  }
1889
1900
  export class SliderLineComponent extends React.Component<ISliderLineComponentProps, {
@@ -1962,7 +1973,7 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
1962
1973
  }): boolean;
1963
1974
  raiseOnPropertyChanged(newValue: string, previousValue: string): void;
1964
1975
  getCurrentNumericValue(value: string): number;
1965
- updateValue(value: string): void;
1976
+ updateValue(value: string, valueToValidate?: string): void;
1966
1977
  incrementValue(amount: number): void;
1967
1978
  onKeyDown(event: React.KeyboardEvent): void;
1968
1979
  render(): JSX.Element;
@@ -2047,6 +2058,7 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
2047
2058
  onPropertyChangedObservable?: Observable<BABYLON.GuiEditor.SharedUIComponents.PropertyChangedEvent>;
2048
2059
  icon?: string;
2049
2060
  iconLabel?: string;
2061
+ lockObject: BABYLON.GuiEditor.SharedUIComponents.LockObject;
2050
2062
  }
2051
2063
  export class Vector2LineComponent extends React.Component<IVector2LineComponentProps, {
2052
2064
  isExpanded: boolean;
@@ -2086,6 +2098,7 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
2086
2098
  noSlider?: boolean;
2087
2099
  icon?: string;
2088
2100
  iconLabel?: string;
2101
+ lockObject: BABYLON.GuiEditor.SharedUIComponents.LockObject;
2089
2102
  }
2090
2103
  export class Vector3LineComponent extends React.Component<IVector3LineComponentProps, {
2091
2104
  isExpanded: boolean;
@@ -2128,6 +2141,7 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
2128
2141
  icon?: string;
2129
2142
  iconLabel?: string;
2130
2143
  value?: Vector4;
2144
+ lockObject: BABYLON.GuiEditor.SharedUIComponents.LockObject;
2131
2145
  }
2132
2146
  export class Vector4LineComponent extends React.Component<IVector4LineComponentProps, {
2133
2147
  isExpanded: boolean;
@@ -2203,6 +2217,7 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
2203
2217
  onEmitNewNode: (nodeData: BABYLON.GuiEditor.SharedUIComponents.INodeData) => BABYLON.GuiEditor.SharedUIComponents.GraphNode;
2204
2218
  }
2205
2219
  export class GraphCanvasComponent extends React.Component<IGraphCanvasComponentProps> implements BABYLON.GuiEditor.SharedUIComponents.INodeContainer {
2220
+ static readonly NodeWidth = 100;
2206
2221
  private readonly _minZoom;
2207
2222
  private readonly _maxZoom;
2208
2223
  private _hostCanvas;
@@ -2239,6 +2254,8 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
2239
2254
  private _oldY;
2240
2255
  _frameIsMoving: boolean;
2241
2256
  _isLoading: boolean;
2257
+ private _copiedNodes;
2258
+ private _copiedFrames;
2242
2259
  get gridSize(): number;
2243
2260
  set gridSize(value: number);
2244
2261
  get stateManager(): BABYLON.GuiEditor.SharedUIComponents.StateManager;
@@ -2262,6 +2279,11 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
2262
2279
  get frameContainer(): HTMLDivElement;
2263
2280
  private _selectedFrameAndNodesConflict;
2264
2281
  constructor(props: IGraphCanvasComponentProps);
2282
+ populateConnectedEntriesBeforeRemoval(item: BABYLON.GuiEditor.SharedUIComponents.GraphNode, items: BABYLON.GuiEditor.SharedUIComponents.GraphNode[], inputs: Nullable<BABYLON.GuiEditor.SharedUIComponents.IPortData>[], outputs: Nullable<BABYLON.GuiEditor.SharedUIComponents.IPortData>[]): void;
2283
+ automaticRewire(inputs: Nullable<BABYLON.GuiEditor.SharedUIComponents.IPortData>[], outputs: Nullable<BABYLON.GuiEditor.SharedUIComponents.IPortData>[]): void;
2284
+ handleKeyDown(evt: KeyboardEvent, onRemove: (nodeData: BABYLON.GuiEditor.SharedUIComponents.INodeData) => void, mouseLocationX: number, mouseLocationY: number, dataGenerator: (nodeData: BABYLON.GuiEditor.SharedUIComponents.INodeData) => any, rootElement: HTMLDivElement): void;
2285
+ pasteSelection(copiedNodes: BABYLON.GuiEditor.SharedUIComponents.GraphNode[], currentX: number, currentY: number, dataGenerator: (nodeData: BABYLON.GuiEditor.SharedUIComponents.INodeData) => any, selectNew?: boolean): BABYLON.GuiEditor.SharedUIComponents.GraphNode[];
2286
+ reconnectNewNodes(nodeIndex: number, newNodes: BABYLON.GuiEditor.SharedUIComponents.GraphNode[], sourceNodes: BABYLON.GuiEditor.SharedUIComponents.GraphNode[], done: boolean[]): void;
2265
2287
  getCachedData(): any[];
2266
2288
  removeDataFromCache(data: any): void;
2267
2289
  createNodeFromObject(nodeData: BABYLON.GuiEditor.SharedUIComponents.INodeData, onNodeCreated: (data: any) => void, recursion?: boolean): BABYLON.GuiEditor.SharedUIComponents.GraphNode;
@@ -2283,6 +2305,7 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
2283
2305
  zoomToFit(): void;
2284
2306
  processCandidatePort(): void;
2285
2307
  connectNodes(nodeA: BABYLON.GuiEditor.SharedUIComponents.GraphNode, pointA: BABYLON.GuiEditor.SharedUIComponents.IPortData, nodeB: BABYLON.GuiEditor.SharedUIComponents.GraphNode, pointB: BABYLON.GuiEditor.SharedUIComponents.IPortData): void;
2308
+ drop(newNode: BABYLON.GuiEditor.SharedUIComponents.GraphNode, targetX: number, targetY: number, offsetX: number, offsetY: number): void;
2286
2309
  processEditorData(editorData: BABYLON.GuiEditor.SharedUIComponents.IEditorData): void;
2287
2310
  reOrganize(editorData?: Nullable<BABYLON.GuiEditor.SharedUIComponents.IEditorData>, isImportingAFrame?: boolean): void;
2288
2311
  addFrame(frameData: BABYLON.GuiEditor.SharedUIComponents.IFrameData): void;
@@ -2455,7 +2478,8 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
2455
2478
  content: BABYLON.GuiEditor.SharedUIComponents.INodeData;
2456
2479
  private _visual;
2457
2480
  private _headerContainer;
2458
- private _warning;
2481
+ private _headerIcon;
2482
+ private _headerIconImg;
2459
2483
  private _header;
2460
2484
  private _connections;
2461
2485
  private _inputsContainer;
@@ -2560,7 +2584,7 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
2560
2584
  uniqueId: number;
2561
2585
  isInput: boolean;
2562
2586
  comments: string;
2563
- getWarningMessage: () => string;
2587
+ prepareHeaderIcon: (iconDiv: HTMLDivElement, img: HTMLImageElement) => void;
2564
2588
  getClassName: () => string;
2565
2589
  dispose: () => void;
2566
2590
  getPortByName: (name: string) => Nullable<BABYLON.GuiEditor.SharedUIComponents.IPortData>;
@@ -2629,6 +2653,7 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
2629
2653
  hasEndpoints: boolean;
2630
2654
  endpoints: Nullable<IPortData[]>;
2631
2655
  updateDisplayName: (newName: string) => void;
2656
+ canConnectTo: (port: IPortData) => boolean;
2632
2657
  connectTo: (port: IPortData) => void;
2633
2658
  disconnectFrom: (port: IPortData) => void;
2634
2659
  checkCompatibilityState(port: IPortData): number;
@@ -2767,7 +2792,7 @@ declare module BABYLON.GuiEditor.SharedUIComponents {
2767
2792
  targetY: number;
2768
2793
  needRepositioning?: boolean | undefined;
2769
2794
  }>;
2770
- exportData: (data: any) => string;
2795
+ exportData: (data: any, frame?: Nullable<BABYLON.GuiEditor.SharedUIComponents.GraphFrame>) => string;
2771
2796
  isElbowConnectionAllowed: (nodeA: BABYLON.GuiEditor.SharedUIComponents.FrameNodePort | BABYLON.GuiEditor.SharedUIComponents.NodePort, nodeB: BABYLON.GuiEditor.SharedUIComponents.FrameNodePort | BABYLON.GuiEditor.SharedUIComponents.NodePort) => boolean;
2772
2797
  applyNodePortDesign: (data: BABYLON.GuiEditor.SharedUIComponents.IPortData, element: HTMLElement, img: HTMLImageElement) => void;
2773
2798
  storeEditorData: (serializationObject: any, frame?: Nullable<BABYLON.GuiEditor.SharedUIComponents.GraphFrame>) => void;