babylonjs-node-geometry-editor 7.34.2 → 7.34.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.
@@ -36,6 +36,7 @@ declare module BABYLON.NodeGeometryEditor {
36
36
  */
37
37
  export class NodeGeometryEditor {
38
38
  private static _CurrentState;
39
+ private static _PopupWindow;
39
40
  /**
40
41
  * Show the node editor
41
42
  * @param options defines the options to use to configure the node editor
@@ -65,12 +66,7 @@ declare module BABYLON.NodeGeometryEditor {
65
66
  private _graphCanvasRef;
66
67
  private _diagramContainerRef;
67
68
  private _graphCanvas;
68
- private _diagramContainer;
69
69
  private _historyStack;
70
- private _startX;
71
- private _moveInProgress;
72
- private _leftWidth;
73
- private _rightWidth;
74
70
  private _previewManager;
75
71
  private _mouseLocationX;
76
72
  private _mouseLocationY;
@@ -90,18 +86,13 @@ declare module BABYLON.NodeGeometryEditor {
90
86
  showWaitScreen(): void;
91
87
  hideWaitScreen(): void;
92
88
  reOrganize(editorData?: BABYLON.Nullable<BABYLON.NodeGeometryEditor.SharedUIComponents.IEditorData>, isImportingAFrame?: boolean): void;
93
- onPointerDown(evt: React.PointerEvent<HTMLDivElement>): void;
94
- onPointerUp(evt: React.PointerEvent<HTMLDivElement>): void;
95
89
  onWheel: (evt: WheelEvent) => void;
96
- resizeColumns(evt: React.PointerEvent<HTMLDivElement>, forLeft?: boolean): void;
97
- buildColumnLayout(): string;
98
90
  emitNewBlock(blockType: string, targetX: number, targetY: number): BABYLON.NodeGeometryEditor.SharedUIComponents.GraphNode | undefined;
99
91
  dropNewBlock(event: React.DragEvent<HTMLDivElement>): void;
100
92
  handlePopUp: () => void;
101
93
  handleClosingPopUp: () => void;
102
94
  initiatePreviewArea: (canvas?: HTMLCanvasElement) => void;
103
95
  createPopUp: () => void;
104
- createPopupWindow: (title: string, windowVariableName: string, width?: number, height?: number) => Window | null;
105
96
  createPreviewMeshControlHost: (options: IInternalPreviewAreaOptions, parentControl: BABYLON.Nullable<HTMLElement>) => void;
106
97
  createPreviewHost: (options: IInternalPreviewAreaOptions, parentControl: BABYLON.Nullable<HTMLElement>) => void;
107
98
  fixPopUpStyles: (document: Document) => void;
@@ -186,12 +177,6 @@ declare module BABYLON.NodeGeometryEditor {
186
177
  }
187
178
 
188
179
 
189
- export class Popup {
190
- static CreatePopup(title: string, windowVariableName: string, width?: number, height?: number): HTMLDivElement | null;
191
- static _CopyStyles(sourceDoc: HTMLDocument, targetDoc: HTMLDocument): void;
192
- }
193
-
194
-
195
180
  export interface ICheckBoxLineComponentProps {
196
181
  label: string;
197
182
  target?: any;
@@ -643,7 +628,6 @@ declare module BABYLON.NodeGeometryEditor {
643
628
 
644
629
  interface IPreviewAreaComponentProps {
645
630
  globalState: GlobalState;
646
- width: number;
647
631
  }
648
632
  export class PreviewAreaComponent extends React.Component<IPreviewAreaComponentProps, {
649
633
  isLoading: boolean;
@@ -702,6 +686,21 @@ declare module BABYLON.NodeGeometryEditor {
702
686
 
703
687
 
704
688
 
689
+ }
690
+ declare module BABYLON.NodeGeometryEditor.SharedUIComponents {
691
+ /**
692
+ * Copy all styles from a document to another document or shadow root
693
+ * @param source document to copy styles from
694
+ * @param target document or shadow root to copy styles to
695
+ */
696
+ export function CopyStyles(source: Document, target: Document): void;
697
+
698
+
699
+
700
+ }
701
+ declare module BABYLON.NodeGeometryEditor {
702
+
703
+
705
704
  }
706
705
  declare module BABYLON.NodeGeometryEditor.SharedUIComponents {
707
706
  export class StringTools {
@@ -734,6 +733,27 @@ declare module BABYLON.NodeGeometryEditor.SharedUIComponents {
734
733
 
735
734
 
736
735
 
736
+ }
737
+ declare module BABYLON.NodeGeometryEditor {
738
+
739
+
740
+ }
741
+ declare module BABYLON.NodeGeometryEditor.SharedUIComponents {
742
+ /**
743
+ * Create a popup window
744
+ * @param title default title for the popup
745
+ * @param options options for the popup
746
+ * @returns the parent control of the popup
747
+ */
748
+ export function CreatePopup(title: string, options: Partial<{
749
+ onParentControlCreateCallback?: (parentControl: HTMLDivElement) => void;
750
+ onWindowCreateCallback?: (newWindow: Window) => void;
751
+ width?: number;
752
+ height?: number;
753
+ }>): HTMLDivElement | null;
754
+
755
+
756
+
737
757
  }
738
758
  declare module BABYLON.NodeGeometryEditor {
739
759
 
@@ -1123,6 +1143,173 @@ declare module BABYLON.NodeGeometryEditor.SharedUIComponents {
1123
1143
 
1124
1144
 
1125
1145
 
1146
+ }
1147
+ declare module BABYLON.NodeGeometryEditor {
1148
+
1149
+
1150
+ }
1151
+ declare module BABYLON.NodeGeometryEditor.SharedUIComponents {
1152
+ /// <reference types="react" />
1153
+ /**
1154
+ * Splitter component properties
1155
+ */
1156
+ export interface ISplitterProps {
1157
+ /**
1158
+ * Unique identifier
1159
+ */
1160
+ id?: string;
1161
+ /**
1162
+ * Splitter size
1163
+ */
1164
+ size: number;
1165
+ /**
1166
+ * Minimum size for the controlled element
1167
+ */
1168
+ minSize?: number;
1169
+ /**
1170
+ * Maximum size for the controlled element
1171
+ */
1172
+ maxSize?: number;
1173
+ /**
1174
+ * Initial size for the controlled element
1175
+ */
1176
+ initialSize?: number;
1177
+ /**
1178
+ * Defines the controlled side
1179
+ */
1180
+ controlledSide: BABYLON.NodeGeometryEditor.SharedUIComponents.ControlledSize;
1181
+ /**
1182
+ * refObject to the splitter element
1183
+ */
1184
+ refObject?: React.RefObject<HTMLDivElement>;
1185
+ }
1186
+ /**
1187
+ * Creates a splitter component
1188
+ * @param props defines the splitter properties
1189
+ * @returns the splitter component
1190
+ */
1191
+ export var Splitter: React.FC<ISplitterProps>;
1192
+
1193
+
1194
+
1195
+ }
1196
+ declare module BABYLON.NodeGeometryEditor {
1197
+
1198
+
1199
+ }
1200
+ declare module BABYLON.NodeGeometryEditor.SharedUIComponents {
1201
+ /// <reference types="react" />
1202
+ export enum ControlledSize {
1203
+ First = 0,
1204
+ Second = 1
1205
+ }
1206
+ export enum SplitDirection {
1207
+ Horizontal = 0,
1208
+ Vertical = 1
1209
+ }
1210
+ /**
1211
+ * Context used to share data with splitters
1212
+ */
1213
+ export interface ISplitContext {
1214
+ /**
1215
+ * Split direction
1216
+ */
1217
+ direction: SplitDirection;
1218
+ /**
1219
+ * Function called by splitters to update the offset
1220
+ * @param offset new offet
1221
+ * @param source source element
1222
+ * @param controlledSide defined controlled element
1223
+ */
1224
+ drag: (offset: number, source: HTMLElement, controlledSide: ControlledSize) => void;
1225
+ /**
1226
+ * Function called by splitters to begin dragging
1227
+ */
1228
+ beginDrag: () => void;
1229
+ /**
1230
+ * Function called by splitters to end dragging
1231
+ */
1232
+ endDrag: () => void;
1233
+ /**
1234
+ * Sync sizes for the elements
1235
+ * @param source source element
1236
+ * @param controlledSide defined controlled element
1237
+ * @param size size of the controlled element
1238
+ * @param minSize minimum size for the controlled element
1239
+ * @param maxSize maximum size for the controlled element
1240
+ */
1241
+ sync: (source: HTMLElement, controlledSide: ControlledSize, size?: number, minSize?: number, maxSize?: number) => void;
1242
+ }
1243
+ export var SplitContext: import("react").Context<ISplitContext>;
1244
+
1245
+
1246
+
1247
+ }
1248
+ declare module BABYLON.NodeGeometryEditor {
1249
+
1250
+
1251
+ }
1252
+ declare module BABYLON.NodeGeometryEditor.SharedUIComponents {
1253
+ /// <reference types="react" />
1254
+ /**
1255
+ * Split container properties
1256
+ */
1257
+ export interface ISplitContainerProps {
1258
+ /**
1259
+ * Unique identifier
1260
+ */
1261
+ id?: string;
1262
+ /**
1263
+ * Split direction
1264
+ */
1265
+ direction: BABYLON.NodeGeometryEditor.SharedUIComponents.SplitDirection;
1266
+ /**
1267
+ * Minimum size for the floating elements
1268
+ */
1269
+ floatingMinSize?: number;
1270
+ /**
1271
+ * RefObject to the root div element
1272
+ */
1273
+ containerRef?: React.RefObject<HTMLDivElement>;
1274
+ /**
1275
+ * Optional class name
1276
+ */
1277
+ className?: string;
1278
+ /**
1279
+ * Pointer down
1280
+ * @param event pointer events
1281
+ */
1282
+ onPointerDown?: (event: React.PointerEvent) => void;
1283
+ /**
1284
+ * Pointer move
1285
+ * @param event pointer events
1286
+ */
1287
+ onPointerMove?: (event: React.PointerEvent) => void;
1288
+ /**
1289
+ * Pointer up
1290
+ * @param event pointer events
1291
+ */
1292
+ onPointerUp?: (event: React.PointerEvent) => void;
1293
+ /**
1294
+ * Drop
1295
+ * @param event drag events
1296
+ */
1297
+ onDrop?: (event: React.DragEvent<HTMLDivElement>) => void;
1298
+ /**
1299
+ * Drag over
1300
+ * @param event drag events
1301
+ */
1302
+ onDragOver?: (event: React.DragEvent<HTMLDivElement>) => void;
1303
+ }
1304
+ /**
1305
+ * Creates a split container component
1306
+ * @param props defines the split container properties
1307
+ * @returns the split container component
1308
+ */
1309
+ export var SplitContainer: React.FC<ISplitContainerProps>;
1310
+
1311
+
1312
+
1126
1313
  }
1127
1314
  declare module BABYLON.NodeGeometryEditor {
1128
1315
 
@@ -2285,19 +2472,6 @@ declare module BABYLON.NodeGeometryEditor.SharedUIComponents {
2285
2472
 
2286
2473
 
2287
2474
 
2288
- }
2289
- declare module BABYLON.NodeGeometryEditor {
2290
-
2291
-
2292
- }
2293
- declare module BABYLON.NodeGeometryEditor.SharedUIComponents {
2294
- export class Popup {
2295
- static CreatePopup(title: string, windowVariableName: string, width?: number, height?: number): HTMLDivElement | null;
2296
- private static _CopyStyles;
2297
- }
2298
-
2299
-
2300
-
2301
2475
  }
2302
2476
  declare module BABYLON.NodeGeometryEditor {
2303
2477