babylonjs-node-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.
- package/babylon.nodeEditor.d.ts +204 -30
- package/babylon.nodeEditor.js +1 -1
- package/babylon.nodeEditor.js.map +1 -1
- package/babylon.nodeEditor.max.js +666 -232
- package/babylon.nodeEditor.module.d.ts +380 -55
- package/package.json +2 -2
package/babylon.nodeEditor.d.ts
CHANGED
|
@@ -34,6 +34,7 @@ declare module BABYLON.NodeEditor {
|
|
|
34
34
|
*/
|
|
35
35
|
export class NodeEditor {
|
|
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.NodeEditor {
|
|
|
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 _historyStack;
|
|
72
68
|
private _previewManager;
|
|
73
69
|
private _mouseLocationX;
|
|
@@ -88,18 +84,13 @@ declare module BABYLON.NodeEditor {
|
|
|
88
84
|
showWaitScreen(): void;
|
|
89
85
|
hideWaitScreen(): void;
|
|
90
86
|
reOrganize(editorData?: BABYLON.Nullable<BABYLON.NodeEditor.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.NodeEditor.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;
|
|
@@ -210,12 +201,6 @@ declare module BABYLON.NodeEditor {
|
|
|
210
201
|
}
|
|
211
202
|
|
|
212
203
|
|
|
213
|
-
export class Popup {
|
|
214
|
-
static CreatePopup(title: string, windowVariableName: string, width?: number, height?: number): HTMLDivElement | null;
|
|
215
|
-
static _CopyStyles(sourceDoc: HTMLDocument, targetDoc: HTMLDocument): void;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
|
|
219
204
|
export interface ICheckBoxLineComponentProps {
|
|
220
205
|
label: string;
|
|
221
206
|
target?: any;
|
|
@@ -878,7 +863,6 @@ declare module BABYLON.NodeEditor {
|
|
|
878
863
|
|
|
879
864
|
interface IPreviewAreaComponentProps {
|
|
880
865
|
globalState: GlobalState;
|
|
881
|
-
width: number;
|
|
882
866
|
}
|
|
883
867
|
export class PreviewAreaComponent extends React.Component<IPreviewAreaComponentProps, {
|
|
884
868
|
isLoading: boolean;
|
|
@@ -938,6 +922,21 @@ declare module BABYLON.NodeEditor {
|
|
|
938
922
|
|
|
939
923
|
|
|
940
924
|
|
|
925
|
+
}
|
|
926
|
+
declare module BABYLON.NodeEditor.SharedUIComponents {
|
|
927
|
+
/**
|
|
928
|
+
* Copy all styles from a document to another document or shadow root
|
|
929
|
+
* @param source document to copy styles from
|
|
930
|
+
* @param target document or shadow root to copy styles to
|
|
931
|
+
*/
|
|
932
|
+
export function CopyStyles(source: Document, target: Document): void;
|
|
933
|
+
|
|
934
|
+
|
|
935
|
+
|
|
936
|
+
}
|
|
937
|
+
declare module BABYLON.NodeEditor {
|
|
938
|
+
|
|
939
|
+
|
|
941
940
|
}
|
|
942
941
|
declare module BABYLON.NodeEditor.SharedUIComponents {
|
|
943
942
|
export class StringTools {
|
|
@@ -970,6 +969,27 @@ declare module BABYLON.NodeEditor.SharedUIComponents {
|
|
|
970
969
|
|
|
971
970
|
|
|
972
971
|
|
|
972
|
+
}
|
|
973
|
+
declare module BABYLON.NodeEditor {
|
|
974
|
+
|
|
975
|
+
|
|
976
|
+
}
|
|
977
|
+
declare module BABYLON.NodeEditor.SharedUIComponents {
|
|
978
|
+
/**
|
|
979
|
+
* Create a popup window
|
|
980
|
+
* @param title default title for the popup
|
|
981
|
+
* @param options options for the popup
|
|
982
|
+
* @returns the parent control of the popup
|
|
983
|
+
*/
|
|
984
|
+
export function CreatePopup(title: string, options: Partial<{
|
|
985
|
+
onParentControlCreateCallback?: (parentControl: HTMLDivElement) => void;
|
|
986
|
+
onWindowCreateCallback?: (newWindow: Window) => void;
|
|
987
|
+
width?: number;
|
|
988
|
+
height?: number;
|
|
989
|
+
}>): HTMLDivElement | null;
|
|
990
|
+
|
|
991
|
+
|
|
992
|
+
|
|
973
993
|
}
|
|
974
994
|
declare module BABYLON.NodeEditor {
|
|
975
995
|
|
|
@@ -1359,6 +1379,173 @@ declare module BABYLON.NodeEditor.SharedUIComponents {
|
|
|
1359
1379
|
|
|
1360
1380
|
|
|
1361
1381
|
|
|
1382
|
+
}
|
|
1383
|
+
declare module BABYLON.NodeEditor {
|
|
1384
|
+
|
|
1385
|
+
|
|
1386
|
+
}
|
|
1387
|
+
declare module BABYLON.NodeEditor.SharedUIComponents {
|
|
1388
|
+
/// <reference types="react" />
|
|
1389
|
+
/**
|
|
1390
|
+
* Splitter component properties
|
|
1391
|
+
*/
|
|
1392
|
+
export interface ISplitterProps {
|
|
1393
|
+
/**
|
|
1394
|
+
* Unique identifier
|
|
1395
|
+
*/
|
|
1396
|
+
id?: string;
|
|
1397
|
+
/**
|
|
1398
|
+
* Splitter size
|
|
1399
|
+
*/
|
|
1400
|
+
size: number;
|
|
1401
|
+
/**
|
|
1402
|
+
* Minimum size for the controlled element
|
|
1403
|
+
*/
|
|
1404
|
+
minSize?: number;
|
|
1405
|
+
/**
|
|
1406
|
+
* Maximum size for the controlled element
|
|
1407
|
+
*/
|
|
1408
|
+
maxSize?: number;
|
|
1409
|
+
/**
|
|
1410
|
+
* Initial size for the controlled element
|
|
1411
|
+
*/
|
|
1412
|
+
initialSize?: number;
|
|
1413
|
+
/**
|
|
1414
|
+
* Defines the controlled side
|
|
1415
|
+
*/
|
|
1416
|
+
controlledSide: BABYLON.NodeEditor.SharedUIComponents.ControlledSize;
|
|
1417
|
+
/**
|
|
1418
|
+
* refObject to the splitter element
|
|
1419
|
+
*/
|
|
1420
|
+
refObject?: React.RefObject<HTMLDivElement>;
|
|
1421
|
+
}
|
|
1422
|
+
/**
|
|
1423
|
+
* Creates a splitter component
|
|
1424
|
+
* @param props defines the splitter properties
|
|
1425
|
+
* @returns the splitter component
|
|
1426
|
+
*/
|
|
1427
|
+
export var Splitter: React.FC<ISplitterProps>;
|
|
1428
|
+
|
|
1429
|
+
|
|
1430
|
+
|
|
1431
|
+
}
|
|
1432
|
+
declare module BABYLON.NodeEditor {
|
|
1433
|
+
|
|
1434
|
+
|
|
1435
|
+
}
|
|
1436
|
+
declare module BABYLON.NodeEditor.SharedUIComponents {
|
|
1437
|
+
/// <reference types="react" />
|
|
1438
|
+
export enum ControlledSize {
|
|
1439
|
+
First = 0,
|
|
1440
|
+
Second = 1
|
|
1441
|
+
}
|
|
1442
|
+
export enum SplitDirection {
|
|
1443
|
+
Horizontal = 0,
|
|
1444
|
+
Vertical = 1
|
|
1445
|
+
}
|
|
1446
|
+
/**
|
|
1447
|
+
* Context used to share data with splitters
|
|
1448
|
+
*/
|
|
1449
|
+
export interface ISplitContext {
|
|
1450
|
+
/**
|
|
1451
|
+
* Split direction
|
|
1452
|
+
*/
|
|
1453
|
+
direction: SplitDirection;
|
|
1454
|
+
/**
|
|
1455
|
+
* Function called by splitters to update the offset
|
|
1456
|
+
* @param offset new offet
|
|
1457
|
+
* @param source source element
|
|
1458
|
+
* @param controlledSide defined controlled element
|
|
1459
|
+
*/
|
|
1460
|
+
drag: (offset: number, source: HTMLElement, controlledSide: ControlledSize) => void;
|
|
1461
|
+
/**
|
|
1462
|
+
* Function called by splitters to begin dragging
|
|
1463
|
+
*/
|
|
1464
|
+
beginDrag: () => void;
|
|
1465
|
+
/**
|
|
1466
|
+
* Function called by splitters to end dragging
|
|
1467
|
+
*/
|
|
1468
|
+
endDrag: () => void;
|
|
1469
|
+
/**
|
|
1470
|
+
* Sync sizes for the elements
|
|
1471
|
+
* @param source source element
|
|
1472
|
+
* @param controlledSide defined controlled element
|
|
1473
|
+
* @param size size of the controlled element
|
|
1474
|
+
* @param minSize minimum size for the controlled element
|
|
1475
|
+
* @param maxSize maximum size for the controlled element
|
|
1476
|
+
*/
|
|
1477
|
+
sync: (source: HTMLElement, controlledSide: ControlledSize, size?: number, minSize?: number, maxSize?: number) => void;
|
|
1478
|
+
}
|
|
1479
|
+
export var SplitContext: import("react").Context<ISplitContext>;
|
|
1480
|
+
|
|
1481
|
+
|
|
1482
|
+
|
|
1483
|
+
}
|
|
1484
|
+
declare module BABYLON.NodeEditor {
|
|
1485
|
+
|
|
1486
|
+
|
|
1487
|
+
}
|
|
1488
|
+
declare module BABYLON.NodeEditor.SharedUIComponents {
|
|
1489
|
+
/// <reference types="react" />
|
|
1490
|
+
/**
|
|
1491
|
+
* Split container properties
|
|
1492
|
+
*/
|
|
1493
|
+
export interface ISplitContainerProps {
|
|
1494
|
+
/**
|
|
1495
|
+
* Unique identifier
|
|
1496
|
+
*/
|
|
1497
|
+
id?: string;
|
|
1498
|
+
/**
|
|
1499
|
+
* Split direction
|
|
1500
|
+
*/
|
|
1501
|
+
direction: BABYLON.NodeEditor.SharedUIComponents.SplitDirection;
|
|
1502
|
+
/**
|
|
1503
|
+
* Minimum size for the floating elements
|
|
1504
|
+
*/
|
|
1505
|
+
floatingMinSize?: number;
|
|
1506
|
+
/**
|
|
1507
|
+
* RefObject to the root div element
|
|
1508
|
+
*/
|
|
1509
|
+
containerRef?: React.RefObject<HTMLDivElement>;
|
|
1510
|
+
/**
|
|
1511
|
+
* Optional class name
|
|
1512
|
+
*/
|
|
1513
|
+
className?: string;
|
|
1514
|
+
/**
|
|
1515
|
+
* Pointer down
|
|
1516
|
+
* @param event pointer events
|
|
1517
|
+
*/
|
|
1518
|
+
onPointerDown?: (event: React.PointerEvent) => void;
|
|
1519
|
+
/**
|
|
1520
|
+
* Pointer move
|
|
1521
|
+
* @param event pointer events
|
|
1522
|
+
*/
|
|
1523
|
+
onPointerMove?: (event: React.PointerEvent) => void;
|
|
1524
|
+
/**
|
|
1525
|
+
* Pointer up
|
|
1526
|
+
* @param event pointer events
|
|
1527
|
+
*/
|
|
1528
|
+
onPointerUp?: (event: React.PointerEvent) => void;
|
|
1529
|
+
/**
|
|
1530
|
+
* Drop
|
|
1531
|
+
* @param event drag events
|
|
1532
|
+
*/
|
|
1533
|
+
onDrop?: (event: React.DragEvent<HTMLDivElement>) => void;
|
|
1534
|
+
/**
|
|
1535
|
+
* Drag over
|
|
1536
|
+
* @param event drag events
|
|
1537
|
+
*/
|
|
1538
|
+
onDragOver?: (event: React.DragEvent<HTMLDivElement>) => void;
|
|
1539
|
+
}
|
|
1540
|
+
/**
|
|
1541
|
+
* Creates a split container component
|
|
1542
|
+
* @param props defines the split container properties
|
|
1543
|
+
* @returns the split container component
|
|
1544
|
+
*/
|
|
1545
|
+
export var SplitContainer: React.FC<ISplitContainerProps>;
|
|
1546
|
+
|
|
1547
|
+
|
|
1548
|
+
|
|
1362
1549
|
}
|
|
1363
1550
|
declare module BABYLON.NodeEditor {
|
|
1364
1551
|
|
|
@@ -2521,19 +2708,6 @@ declare module BABYLON.NodeEditor.SharedUIComponents {
|
|
|
2521
2708
|
|
|
2522
2709
|
|
|
2523
2710
|
|
|
2524
|
-
}
|
|
2525
|
-
declare module BABYLON.NodeEditor {
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
}
|
|
2529
|
-
declare module BABYLON.NodeEditor.SharedUIComponents {
|
|
2530
|
-
export class Popup {
|
|
2531
|
-
static CreatePopup(title: string, windowVariableName: string, width?: number, height?: number): HTMLDivElement | null;
|
|
2532
|
-
private static _CopyStyles;
|
|
2533
|
-
}
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
2711
|
}
|
|
2538
2712
|
declare module BABYLON.NodeEditor {
|
|
2539
2713
|
|