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