babylonjs-node-editor 5.12.1 → 5.13.2

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.
@@ -216,10 +216,10 @@ declare module BABYLON.NodeEditor {
216
216
  globalState: GlobalState;
217
217
  }
218
218
  interface IPropertyTabComponentState {
219
- currentNode: BABYLON.Nullable<GraphNode>;
220
- currentFrame: BABYLON.Nullable<GraphFrame>;
221
- currentFrameNodePort: BABYLON.Nullable<FrameNodePort>;
222
- currentNodePort: BABYLON.Nullable<NodePort>;
219
+ currentNode: BABYLON.Nullable<BABYLON.NodeEditor.SharedUIComponents.GraphNode>;
220
+ currentFrame: BABYLON.Nullable<BABYLON.NodeEditor.SharedUIComponents.GraphFrame>;
221
+ currentFrameNodePort: BABYLON.Nullable<BABYLON.NodeEditor.SharedUIComponents.FrameNodePort>;
222
+ currentNodePort: BABYLON.Nullable<BABYLON.NodeEditor.SharedUIComponents.NodePort>;
223
223
  uploadInProgress: boolean;
224
224
  }
225
225
  export class PropertyTabComponent extends React.Component<IPropertyTabComponentProps, IPropertyTabComponentState> {
@@ -241,568 +241,330 @@ declare module BABYLON.NodeEditor {
241
241
  }
242
242
 
243
243
 
244
- export class ClampDisplayManager implements IDisplayManager {
244
+ export class GlobalState {
245
+ nodeMaterial: BABYLON.NodeMaterial;
246
+ hostElement: HTMLElement;
247
+ hostDocument: Document;
248
+ hostWindow: Window;
249
+ stateManager: BABYLON.NodeEditor.SharedUIComponents.StateManager;
250
+ onBuiltObservable: BABYLON.Observable<void>;
251
+ onResetRequiredObservable: BABYLON.Observable<boolean>;
252
+ onZoomToFitRequiredObservable: BABYLON.Observable<void>;
253
+ onReOrganizedRequiredObservable: BABYLON.Observable<void>;
254
+ onLogRequiredObservable: BABYLON.Observable<LogEntry>;
255
+ onIsLoadingChanged: BABYLON.Observable<boolean>;
256
+ onPreviewCommandActivated: BABYLON.Observable<boolean>;
257
+ onLightUpdated: BABYLON.Observable<void>;
258
+ onPreviewBackgroundChanged: BABYLON.Observable<void>;
259
+ onBackFaceCullingChanged: BABYLON.Observable<void>;
260
+ onDepthPrePassChanged: BABYLON.Observable<void>;
261
+ onAnimationCommandActivated: BABYLON.Observable<void>;
262
+ onImportFrameObservable: BABYLON.Observable<any>;
263
+ onPopupClosedObservable: BABYLON.Observable<void>;
264
+ onGetNodeFromBlock: (block: BABYLON.NodeMaterialBlock) => BABYLON.NodeEditor.SharedUIComponents.GraphNode;
265
+ previewType: PreviewType;
266
+ previewFile: File;
267
+ particleSystemBlendMode: number;
268
+ listOfCustomPreviewFiles: File[];
269
+ rotatePreview: boolean;
270
+ backgroundColor: BABYLON.Color4;
271
+ backFaceCulling: boolean;
272
+ depthPrePass: boolean;
273
+ lockObject: BABYLON.NodeEditor.SharedUIComponents.LockObject;
274
+ hemisphericLight: boolean;
275
+ directionalLight0: boolean;
276
+ directionalLight1: boolean;
277
+ controlCamera: boolean;
278
+ _mode: BABYLON.NodeMaterialModes;
279
+ /** Gets the mode */
280
+ get mode(): BABYLON.NodeMaterialModes;
281
+ /** Sets the mode */
282
+ set mode(m: BABYLON.NodeMaterialModes);
283
+ customSave?: {
284
+ label: string;
285
+ action: (data: string) => Promise<void>;
286
+ };
287
+ constructor();
288
+ storeEditorData(serializationObject: any, frame?: BABYLON.Nullable<BABYLON.NodeEditor.SharedUIComponents.GraphFrame>): void;
289
+ }
290
+
291
+
292
+ interface IGraphEditorProps {
293
+ globalState: GlobalState;
294
+ }
295
+ interface IGraphEditorState {
296
+ showPreviewPopUp: boolean;
297
+ }
298
+ interface IInternalPreviewAreaOptions extends BABYLON.IInspectorOptions {
299
+ popup: boolean;
300
+ original: boolean;
301
+ explorerWidth?: string;
302
+ inspectorWidth?: string;
303
+ embedHostWidth?: string;
304
+ }
305
+ export class GraphEditor extends React.Component<IGraphEditorProps, IGraphEditorState> {
306
+ static readonly NodeWidth = 100;
307
+ private _graphCanvasRef;
308
+ private _diagramContainerRef;
309
+ private _graphCanvas;
310
+ private _diagramContainer;
311
+ private _startX;
312
+ private _moveInProgress;
313
+ private _leftWidth;
314
+ private _rightWidth;
315
+ private _previewManager;
316
+ private _copiedNodes;
317
+ private _copiedFrames;
318
+ private _mouseLocationX;
319
+ private _mouseLocationY;
320
+ private _onWidgetKeyUpPointer;
321
+ private _previewHost;
322
+ private _popUpWindow;
323
+ appendBlock(dataToAppend: BABYLON.NodeMaterialBlock | BABYLON.NodeEditor.SharedUIComponents.INodeData, recursion?: boolean): BABYLON.NodeEditor.SharedUIComponents.GraphNode;
324
+ addValueNode(type: string): BABYLON.NodeEditor.SharedUIComponents.GraphNode;
325
+ componentDidMount(): void;
326
+ componentWillUnmount(): void;
327
+ constructor(props: IGraphEditorProps);
328
+ reconnectNewNodes(nodeIndex: number, newNodes: BABYLON.NodeEditor.SharedUIComponents.GraphNode[], sourceNodes: BABYLON.NodeEditor.SharedUIComponents.GraphNode[], done: boolean[]): void;
329
+ pasteSelection(copiedNodes: BABYLON.NodeEditor.SharedUIComponents.GraphNode[], currentX: number, currentY: number, selectNew?: boolean): BABYLON.NodeEditor.SharedUIComponents.GraphNode[] | undefined;
330
+ zoomToFit(): void;
331
+ buildMaterial(autoConfigure?: boolean): void;
332
+ build(ignoreEditorData?: boolean): void;
333
+ loadGraph(): void;
334
+ showWaitScreen(): void;
335
+ hideWaitScreen(): void;
336
+ reOrganize(editorData?: BABYLON.Nullable<BABYLON.NodeEditor.SharedUIComponents.IEditorData>, isImportingAFrame?: boolean): void;
337
+ onPointerDown(evt: React.PointerEvent<HTMLDivElement>): void;
338
+ onPointerUp(evt: React.PointerEvent<HTMLDivElement>): void;
339
+ onWheel(this: any, evt: WheelEvent): void;
340
+ resizeColumns(evt: React.PointerEvent<HTMLDivElement>, forLeft?: boolean): void;
341
+ buildColumnLayout(): string;
342
+ emitNewBlock(blockType: string, targetX: number, targetY: number): void;
343
+ dropNewBlock(event: React.DragEvent<HTMLDivElement>): void;
344
+ handlePopUp: () => void;
345
+ handleClosingPopUp: () => void;
346
+ initiatePreviewArea: (canvas?: HTMLCanvasElement) => void;
347
+ createPopUp: () => void;
348
+ createPopupWindow: (title: string, windowVariableName: string, width?: number, height?: number) => Window | null;
349
+ createPreviewMeshControlHost: (options: IInternalPreviewAreaOptions, parentControl: BABYLON.Nullable<HTMLElement>) => void;
350
+ createPreviewHost: (options: IInternalPreviewAreaOptions, parentControl: BABYLON.Nullable<HTMLElement>) => void;
351
+ fixPopUpStyles: (document: Document) => void;
352
+ render(): JSX.Element;
353
+ }
354
+
355
+
356
+ export class BlockNodeData implements BABYLON.NodeEditor.SharedUIComponents.INodeData {
357
+ data: BABYLON.NodeMaterialBlock;
358
+ private _inputs;
359
+ private _outputs;
360
+ get uniqueId(): number;
361
+ get name(): string;
362
+ getClassName(): string;
363
+ get isInput(): boolean;
364
+ get inputs(): BABYLON.NodeEditor.SharedUIComponents.IPortData[];
365
+ get outputs(): BABYLON.NodeEditor.SharedUIComponents.IPortData[];
366
+ get comments(): string;
367
+ set comments(value: string);
368
+ getPortByName(name: string): BABYLON.NodeEditor.SharedUIComponents.IPortData | null;
369
+ dispose(): void;
370
+ getWarningMessage(): "" | "For optimization reasons, this block will be promoted to the vertex shader. You can force it to render in the fragment shader by setting its target to Fragment";
371
+ constructor(data: BABYLON.NodeMaterialBlock, nodeContainer: BABYLON.NodeEditor.SharedUIComponents.INodeContainer);
372
+ }
373
+
374
+
375
+ export class ConnectionPointPortData implements BABYLON.NodeEditor.SharedUIComponents.IPortData {
376
+ private _connectedPort;
377
+ private _nodeContainer;
378
+ data: BABYLON.NodeMaterialConnectionPoint;
379
+ get name(): string;
380
+ get internalName(): string;
381
+ get isExposedOnFrame(): boolean;
382
+ set isExposedOnFrame(value: boolean);
383
+ get exposedPortPosition(): number;
384
+ set exposedPortPosition(value: number);
385
+ get isConnected(): boolean;
386
+ get connectedPort(): BABYLON.Nullable<BABYLON.NodeEditor.SharedUIComponents.IPortData>;
387
+ set connectedPort(value: BABYLON.Nullable<BABYLON.NodeEditor.SharedUIComponents.IPortData>);
388
+ get direction(): BABYLON.NodeEditor.SharedUIComponents.PortDataDirection;
389
+ get ownerData(): import("core/Materials/Node/nodeMaterialBlock").NodeMaterialBlock;
390
+ get needDualDirectionValidation(): boolean;
391
+ get hasEndpoints(): boolean;
392
+ get endpoints(): BABYLON.NodeEditor.SharedUIComponents.IPortData[];
393
+ constructor(connectionPoint: BABYLON.NodeMaterialConnectionPoint, nodeContainer: BABYLON.NodeEditor.SharedUIComponents.INodeContainer);
394
+ updateDisplayName(newName: string): void;
395
+ connectTo(port: BABYLON.NodeEditor.SharedUIComponents.IPortData): void;
396
+ disconnectFrom(port: BABYLON.NodeEditor.SharedUIComponents.IPortData): void;
397
+ checkCompatibilityState(port: BABYLON.NodeEditor.SharedUIComponents.IPortData): 0 | BABYLON.NodeMaterialConnectionPointCompatibilityStates.TypeIncompatible | BABYLON.NodeMaterialConnectionPointCompatibilityStates.TargetIncompatible | BABYLON.NodeMaterialConnectionPointCompatibilityStates.HierarchyIssue;
398
+ getCompatibilityIssueMessage(issue: number, targetNode: BABYLON.NodeEditor.SharedUIComponents.GraphNode, targetPort: BABYLON.NodeEditor.SharedUIComponents.IPortData): "" | "Cannot connect two different connection types" | "Source block can only work in fragment shader whereas destination block is currently aimed for the vertex shader" | "Source block cannot be connected with one of its ancestors";
399
+ }
400
+
401
+
402
+ export class ClampDisplayManager implements BABYLON.NodeEditor.SharedUIComponents.IDisplayManager {
245
403
  getHeaderClass(): string;
246
404
  shouldDisplayPortLabels(): boolean;
247
- getHeaderText(block: BABYLON.NodeMaterialBlock): string;
405
+ getHeaderText(nodeData: BABYLON.NodeEditor.SharedUIComponents.INodeData): string;
248
406
  getBackgroundColor(): string;
249
- updatePreviewContent(block: BABYLON.NodeMaterialBlock, contentArea: HTMLDivElement): void;
407
+ updatePreviewContent(nodeData: BABYLON.NodeEditor.SharedUIComponents.INodeData, contentArea: HTMLDivElement): void;
250
408
  }
251
409
 
252
410
 
253
- export class ConditionalDisplayManager implements IDisplayManager {
411
+ export class ConditionalDisplayManager implements BABYLON.NodeEditor.SharedUIComponents.IDisplayManager {
254
412
  getHeaderClass(): string;
255
413
  shouldDisplayPortLabels(): boolean;
256
- getHeaderText(block: BABYLON.NodeMaterialBlock): string;
414
+ getHeaderText(nodeData: BABYLON.NodeEditor.SharedUIComponents.INodeData): string;
257
415
  getBackgroundColor(): string;
258
416
  updatePreviewContent(): void;
259
417
  }
260
418
 
261
419
 
262
- export class DiscardDisplayManager implements IDisplayManager {
420
+ export class DiscardDisplayManager implements BABYLON.NodeEditor.SharedUIComponents.IDisplayManager {
263
421
  getHeaderClass(): string;
264
422
  shouldDisplayPortLabels(): boolean;
265
- getHeaderText(block: BABYLON.NodeMaterialBlock): string;
423
+ getHeaderText(nodeData: BABYLON.NodeEditor.SharedUIComponents.INodeData): string;
266
424
  getBackgroundColor(): string;
267
- updatePreviewContent(block: BABYLON.NodeMaterialBlock, contentArea: HTMLDivElement): void;
268
- }
269
-
270
-
271
- export interface IDisplayManager {
272
- getHeaderClass(block: BABYLON.NodeMaterialBlock): string;
273
- shouldDisplayPortLabels(block: BABYLON.NodeMaterialBlock): boolean;
274
- updatePreviewContent(block: BABYLON.NodeMaterialBlock, contentArea: HTMLDivElement): void;
275
- getBackgroundColor(block: BABYLON.NodeMaterialBlock): string;
276
- getHeaderText(block: BABYLON.NodeMaterialBlock): string;
425
+ updatePreviewContent(nodeData: BABYLON.NodeEditor.SharedUIComponents.INodeData, contentArea: HTMLDivElement): void;
277
426
  }
278
427
 
279
428
 
280
- export class ElbowDisplayManager implements IDisplayManager {
429
+ export class ElbowDisplayManager implements BABYLON.NodeEditor.SharedUIComponents.IDisplayManager {
281
430
  getHeaderClass(): string;
282
431
  shouldDisplayPortLabels(): boolean;
283
- getHeaderText(block: BABYLON.NodeMaterialBlock): string;
284
- getBackgroundColor(block: BABYLON.NodeMaterialBlock): string;
285
- updatePreviewContent(block: BABYLON.NodeMaterialBlock, contentArea: HTMLDivElement): void;
432
+ getHeaderText(nodeData: BABYLON.NodeEditor.SharedUIComponents.INodeData): string;
433
+ getBackgroundColor(nodeData: BABYLON.NodeEditor.SharedUIComponents.INodeData): string;
434
+ updatePreviewContent(nodeData: BABYLON.NodeEditor.SharedUIComponents.INodeData, contentArea: HTMLDivElement): void;
286
435
  }
287
436
 
288
437
 
289
- export class GradientDisplayManager implements IDisplayManager {
438
+ export class GradientDisplayManager implements BABYLON.NodeEditor.SharedUIComponents.IDisplayManager {
290
439
  getHeaderClass(): string;
291
440
  shouldDisplayPortLabels(): boolean;
292
- getHeaderText(block: BABYLON.NodeMaterialBlock): string;
293
- getBackgroundColor(block: BABYLON.NodeMaterialBlock): string;
294
- updatePreviewContent(block: BABYLON.NodeMaterialBlock, contentArea: HTMLDivElement): void;
441
+ getHeaderText(nodeData: BABYLON.NodeEditor.SharedUIComponents.INodeData): string;
442
+ getBackgroundColor(nodeData: BABYLON.NodeEditor.SharedUIComponents.INodeData): string;
443
+ updatePreviewContent(nodeData: BABYLON.NodeEditor.SharedUIComponents.INodeData, contentArea: HTMLDivElement): void;
295
444
  }
296
445
 
297
446
 
298
- export class ImageSourceDisplayManager implements IDisplayManager {
447
+ export class ImageSourceDisplayManager implements BABYLON.NodeEditor.SharedUIComponents.IDisplayManager {
299
448
  private _previewCanvas;
300
449
  private _previewImage;
301
450
  getHeaderClass(): string;
302
451
  shouldDisplayPortLabels(): boolean;
303
- getHeaderText(block: BABYLON.NodeMaterialBlock): string;
452
+ getHeaderText(nodeData: BABYLON.NodeEditor.SharedUIComponents.INodeData): string;
304
453
  getBackgroundColor(): string;
305
- updatePreviewContent(block: BABYLON.NodeMaterialBlock, contentArea: HTMLDivElement): void;
454
+ updatePreviewContent(nodeData: BABYLON.NodeEditor.SharedUIComponents.INodeData, contentArea: HTMLDivElement): void;
306
455
  }
307
456
 
308
457
 
309
- export class InputDisplayManager implements IDisplayManager {
310
- getHeaderClass(block: BABYLON.NodeMaterialBlock): "" | "constant" | "inspector";
458
+ export class InputDisplayManager implements BABYLON.NodeEditor.SharedUIComponents.IDisplayManager {
459
+ getHeaderClass(nodeData: BABYLON.NodeEditor.SharedUIComponents.INodeData): "" | "constant" | "inspector";
311
460
  shouldDisplayPortLabels(): boolean;
312
- getHeaderText(block: BABYLON.NodeMaterialBlock): string;
461
+ getHeaderText(nodeData: BABYLON.NodeEditor.SharedUIComponents.INodeData): string;
313
462
  static GetBaseType(type: BABYLON.NodeMaterialBlockConnectionPointTypes): string;
314
- getBackgroundColor(block: BABYLON.NodeMaterialBlock): string;
315
- updatePreviewContent(block: BABYLON.NodeMaterialBlock, contentArea: HTMLDivElement): void;
463
+ getBackgroundColor(nodeData: BABYLON.NodeEditor.SharedUIComponents.INodeData): string;
464
+ updatePreviewContent(nodeData: BABYLON.NodeEditor.SharedUIComponents.INodeData, contentArea: HTMLDivElement): void;
316
465
  }
317
466
 
318
467
 
319
- export class OutputDisplayManager implements IDisplayManager {
468
+ export class OutputDisplayManager implements BABYLON.NodeEditor.SharedUIComponents.IDisplayManager {
320
469
  getHeaderClass(): string;
321
470
  shouldDisplayPortLabels(): boolean;
322
- getHeaderText(block: BABYLON.NodeMaterialBlock): string;
471
+ getHeaderText(nodeData: BABYLON.NodeEditor.SharedUIComponents.INodeData): string;
323
472
  getBackgroundColor(): string;
324
- updatePreviewContent(block: BABYLON.NodeMaterialBlock, contentArea: HTMLDivElement): void;
473
+ updatePreviewContent(nodeData: BABYLON.NodeEditor.SharedUIComponents.INodeData, contentArea: HTMLDivElement): void;
325
474
  }
326
475
 
327
476
 
328
- export class PBRDisplayManager implements IDisplayManager {
477
+ export class PBRDisplayManager implements BABYLON.NodeEditor.SharedUIComponents.IDisplayManager {
329
478
  getHeaderClass(): string;
330
479
  shouldDisplayPortLabels(): boolean;
331
- getHeaderText(block: BABYLON.NodeMaterialBlock): string;
480
+ getHeaderText(nodeData: BABYLON.NodeEditor.SharedUIComponents.INodeData): string;
332
481
  getBackgroundColor(): string;
333
- updatePreviewContent(block: BABYLON.NodeMaterialBlock, contentArea: HTMLDivElement): void;
482
+ updatePreviewContent(nodeData: BABYLON.NodeEditor.SharedUIComponents.INodeData, contentArea: HTMLDivElement): void;
334
483
  }
335
484
 
336
485
 
337
- export class RemapDisplayManager implements IDisplayManager {
486
+ export class RemapDisplayManager implements BABYLON.NodeEditor.SharedUIComponents.IDisplayManager {
338
487
  getHeaderClass(): string;
339
488
  shouldDisplayPortLabels(): boolean;
340
- getHeaderText(block: BABYLON.NodeMaterialBlock): string;
489
+ getHeaderText(nodeData: BABYLON.NodeEditor.SharedUIComponents.INodeData): string;
341
490
  getBackgroundColor(): string;
342
491
  private _extractInputValue;
343
- updatePreviewContent(block: BABYLON.NodeMaterialBlock, contentArea: HTMLDivElement): void;
492
+ updatePreviewContent(nodeData: BABYLON.NodeEditor.SharedUIComponents.INodeData, contentArea: HTMLDivElement): void;
344
493
  }
345
494
 
346
495
 
347
- export class TextureDisplayManager implements IDisplayManager {
496
+ export class TextureDisplayManager implements BABYLON.NodeEditor.SharedUIComponents.IDisplayManager {
348
497
  private _previewCanvas;
349
498
  private _previewImage;
350
499
  getHeaderClass(): string;
351
500
  shouldDisplayPortLabels(): boolean;
352
- getHeaderText(block: BABYLON.NodeMaterialBlock): string;
353
- getBackgroundColor(block: BABYLON.NodeMaterialBlock): string;
354
- updatePreviewContent(block: BABYLON.NodeMaterialBlock, contentArea: HTMLDivElement): void;
501
+ getHeaderText(nodeData: BABYLON.NodeEditor.SharedUIComponents.INodeData): string;
502
+ getBackgroundColor(nodeData: BABYLON.NodeEditor.SharedUIComponents.INodeData): string;
503
+ updatePreviewContent(nodeData: BABYLON.NodeEditor.SharedUIComponents.INodeData, contentArea: HTMLDivElement): void;
355
504
  }
356
505
 
357
506
 
358
- export class TrigonometryDisplayManager implements IDisplayManager {
507
+ export class TrigonometryDisplayManager implements BABYLON.NodeEditor.SharedUIComponents.IDisplayManager {
359
508
  getHeaderClass(): string;
360
509
  shouldDisplayPortLabels(): boolean;
361
- getHeaderText(block: BABYLON.NodeMaterialBlock): string;
510
+ getHeaderText(nodeData: BABYLON.NodeEditor.SharedUIComponents.INodeData): string;
362
511
  getBackgroundColor(): string;
363
- updatePreviewContent(block: BABYLON.NodeMaterialBlock, contentArea: HTMLDivElement): void;
512
+ updatePreviewContent(nodeData: BABYLON.NodeEditor.SharedUIComponents.INodeData, contentArea: HTMLDivElement): void;
364
513
  }
365
514
 
366
515
 
367
- export class DisplayLedger {
368
- static RegisteredControls: {
369
- [key: string]: any;
370
- };
516
+ export class ColorMergerPropertyTabComponent extends React.Component<BABYLON.NodeEditor.SharedUIComponents.IPropertyComponentProps> {
517
+ constructor(props: BABYLON.NodeEditor.SharedUIComponents.IPropertyComponentProps);
518
+ render(): JSX.Element;
371
519
  }
372
520
 
373
521
 
374
- export class FrameNodePort extends NodePort {
375
- connectionPoint: BABYLON.NodeMaterialConnectionPoint;
376
- node: GraphNode;
377
- private _parentFrameId;
378
- private _isInput;
379
- private _framePortPosition;
380
- private _framePortId;
381
- private _onFramePortPositionChangedObservable;
382
- get parentFrameId(): number;
383
- get onFramePortPositionChangedObservable(): BABYLON.Observable<FrameNodePort>;
384
- get isInput(): boolean;
385
- get framePortId(): number;
386
- get framePortPosition(): FramePortPosition;
387
- set framePortPosition(position: FramePortPosition);
388
- constructor(portContainer: HTMLElement, connectionPoint: BABYLON.NodeMaterialConnectionPoint, node: GraphNode, globalState: GlobalState, isInput: boolean, framePortId: number, parentFrameId: number);
389
- static CreateFrameNodePortElement(connectionPoint: BABYLON.NodeMaterialConnectionPoint, node: GraphNode, root: HTMLElement, displayManager: BABYLON.Nullable<IDisplayManager>, globalState: GlobalState, isInput: boolean, framePortId: number, parentFrameId: number): FrameNodePort;
522
+ export class ConditionalPropertyTabComponent extends React.Component<BABYLON.NodeEditor.SharedUIComponents.IPropertyComponentProps> {
523
+ constructor(props: BABYLON.NodeEditor.SharedUIComponents.IPropertyComponentProps);
524
+ render(): JSX.Element;
390
525
  }
391
526
 
392
527
 
393
- export interface IGraphCanvasComponentProps {
528
+ export interface IFrameNodePortPropertyTabComponentProps {
529
+ stateManager: BABYLON.NodeEditor.SharedUIComponents.StateManager;
394
530
  globalState: GlobalState;
395
- onEmitNewBlock: (block: BABYLON.NodeMaterialBlock) => GraphNode;
531
+ frameNodePort: BABYLON.NodeEditor.SharedUIComponents.FrameNodePort;
532
+ frame: BABYLON.NodeEditor.SharedUIComponents.GraphFrame;
396
533
  }
397
- export type FramePortData = {
398
- frame: GraphFrame;
399
- port: FrameNodePort;
400
- };
401
- export const isFramePortData: (variableToCheck: any) => variableToCheck is FramePortData;
402
- export class GraphCanvasComponent extends React.Component<IGraphCanvasComponentProps> {
403
- private readonly _minZoom;
404
- private readonly _maxZoom;
405
- private _hostCanvas;
406
- private _graphCanvas;
407
- private _selectionContainer;
408
- private _frameContainer;
409
- private _svgCanvas;
410
- private _rootContainer;
411
- private _nodes;
412
- private _links;
413
- private _mouseStartPointX;
414
- private _mouseStartPointY;
415
- private _dropPointX;
416
- private _dropPointY;
417
- private _selectionStartX;
418
- private _selectionStartY;
419
- private _candidateLinkedHasMoved;
420
- private _x;
421
- private _y;
422
- private _zoom;
423
- private _selectedNodes;
424
- private _selectedLink;
425
- private _selectedPort;
426
- private _candidateLink;
427
- private _candidatePort;
428
- private _gridSize;
429
- private _selectionBox;
430
- private _selectedFrames;
431
- private _frameCandidate;
432
- private _frames;
433
- private _altKeyIsPressed;
434
- private _multiKeyIsPressed;
435
- private _oldY;
436
- _frameIsMoving: boolean;
437
- _isLoading: boolean;
438
- get gridSize(): number;
439
- set gridSize(value: number);
440
- get globalState(): GlobalState;
441
- get nodes(): GraphNode[];
442
- get links(): NodeLink[];
443
- get frames(): GraphFrame[];
444
- get zoom(): number;
445
- set zoom(value: number);
446
- get x(): number;
447
- set x(value: number);
448
- get y(): number;
449
- set y(value: number);
450
- get selectedNodes(): GraphNode[];
451
- get selectedLink(): BABYLON.Nullable<NodeLink>;
452
- get selectedFrames(): GraphFrame[];
453
- get selectedPort(): BABYLON.Nullable<NodePort>;
454
- get canvasContainer(): HTMLDivElement;
455
- get hostCanvas(): HTMLDivElement;
456
- get svgCanvas(): HTMLElement;
457
- get selectionContainer(): HTMLDivElement;
458
- get frameContainer(): HTMLDivElement;
459
- private _selectedFrameAndNodesConflict;
460
- constructor(props: IGraphCanvasComponentProps);
461
- static _RefreshNode: (node: GraphNode, visitedNodes?: Set<GraphNode> | undefined, visitedLinks?: Set<NodeLink> | undefined) => void;
462
- getGridPosition(position: number, useCeil?: boolean): number;
463
- getGridPositionCeil(position: number): number;
464
- updateTransform(): void;
465
- onKeyUp(): void;
466
- findNodeFromBlock(block: BABYLON.NodeMaterialBlock): GraphNode;
467
- reset(): void;
468
- connectPorts(pointA: BABYLON.NodeMaterialConnectionPoint, pointB: BABYLON.NodeMaterialConnectionPoint): void;
469
- removeLink(link: NodeLink): void;
470
- appendBlock(block: BABYLON.NodeMaterialBlock): GraphNode;
471
- distributeGraph(): void;
534
+ export class FrameNodePortPropertyTabComponent extends React.Component<IFrameNodePortPropertyTabComponentProps, {
535
+ port: BABYLON.NodeEditor.SharedUIComponents.FrameNodePort;
536
+ }> {
537
+ private _onFramePortPositionChangedObserver;
538
+ private _onSelectionChangedObserver;
539
+ constructor(props: IFrameNodePortPropertyTabComponentProps);
540
+ componentWillUnmount(): void;
541
+ render(): JSX.Element;
542
+ }
543
+
544
+
545
+ export interface IFramePropertyTabComponentProps {
546
+ globalState: GlobalState;
547
+ frame: BABYLON.NodeEditor.SharedUIComponents.GraphFrame;
548
+ }
549
+ export class FramePropertyTabComponent extends React.Component<IFramePropertyTabComponentProps> {
550
+ private _onFrameExpandStateChangedObserver;
551
+ constructor(props: IFramePropertyTabComponentProps);
472
552
  componentDidMount(): void;
473
- onMove(evt: React.PointerEvent): void;
474
- onDown(evt: React.PointerEvent<HTMLElement>): void;
475
- onUp(evt: React.PointerEvent): void;
476
- onWheel(evt: React.WheelEvent): void;
477
- zoomToFit(): void;
478
- processCandidatePort(): void;
479
- connectNodes(nodeA: GraphNode, pointA: BABYLON.NodeMaterialConnectionPoint, nodeB: GraphNode, pointB: BABYLON.NodeMaterialConnectionPoint): void;
480
- processEditorData(editorData: IEditorData): void;
481
- addFrame(frameData: IFrameData): void;
553
+ componentWillUnmount(): void;
482
554
  render(): JSX.Element;
483
555
  }
484
556
 
485
557
 
486
- export enum FramePortPosition {
487
- Top = 0,
488
- Middle = 1,
489
- Bottom = 2
558
+ export class GenericPropertyComponent extends React.Component<BABYLON.NodeEditor.SharedUIComponents.IPropertyComponentProps> {
559
+ constructor(props: BABYLON.NodeEditor.SharedUIComponents.IPropertyComponentProps);
560
+ render(): JSX.Element;
490
561
  }
491
- export class GraphFrame {
492
- private readonly _collapsedWidth;
493
- private static _FrameCounter;
494
- private static _FramePortCounter;
495
- private _name;
496
- private _color;
497
- private _x;
498
- private _y;
499
- private _gridAlignedX;
500
- private _gridAlignedY;
501
- private _width;
502
- private _height;
503
- element: HTMLDivElement;
504
- private _borderElement;
505
- private _headerElement;
506
- private _headerTextElement;
507
- private _headerCollapseElement;
508
- private _headerCloseElement;
509
- private _commentsElement;
510
- private _portContainer;
511
- private _outputPortContainer;
512
- private _inputPortContainer;
513
- private _nodes;
514
- private _ownerCanvas;
515
- private _mouseStartPointX;
516
- private _mouseStartPointY;
517
- private _onSelectionChangedObserver;
518
- private _onGraphNodeRemovalObserver;
519
- private _onExposePortOnFrameObserver;
520
- private _onNodeLinkDisposedObservers;
521
- private _isCollapsed;
522
- private _frameInPorts;
523
- private _frameOutPorts;
524
- private _controlledPorts;
525
- private _exposedInPorts;
526
- private _exposedOutPorts;
527
- private _id;
528
- private _comments;
529
- private _frameIsResizing;
530
- private _resizingDirection;
531
- private _minFrameHeight;
532
- private _minFrameWidth;
533
- private _mouseXLimit;
534
- onExpandStateChanged: BABYLON.Observable<GraphFrame>;
535
- private readonly _closeSVG;
536
- private readonly _expandSVG;
537
- private readonly _collapseSVG;
538
- get id(): number;
539
- get isCollapsed(): boolean;
540
- private _createInputPort;
541
- private _markFramePortPositions;
542
- private _createFramePorts;
543
- private _removePortFromExposedWithNode;
544
- private _removePortFromExposedWithLink;
545
- private _createInputPorts;
546
- private _createOutputPorts;
547
- redrawFramePorts(): void;
548
- set isCollapsed(value: boolean);
549
- get nodes(): GraphNode[];
550
- get ports(): FrameNodePort[];
551
- get name(): string;
552
- set name(value: string);
553
- get color(): BABYLON.Color3;
554
- set color(value: BABYLON.Color3);
555
- get x(): number;
556
- set x(value: number);
557
- get y(): number;
558
- set y(value: number);
559
- get width(): number;
560
- set width(value: number);
561
- get height(): number;
562
- set height(value: number);
563
- get comments(): string;
564
- set comments(comments: string);
565
- constructor(candidate: BABYLON.Nullable<HTMLDivElement>, canvas: GraphCanvasComponent, doNotCaptureNodes?: boolean);
566
- refresh(): void;
567
- addNode(node: GraphNode): void;
568
- removeNode(node: GraphNode): void;
569
- syncNode(node: GraphNode): void;
570
- cleanAccumulation(): void;
571
- private _onDown;
572
- move(newX: number, newY: number, align?: boolean): void;
573
- private _onUp;
574
- _moveFrame(offsetX: number, offsetY: number): void;
575
- private _onMove;
576
- moveFramePortUp(nodePort: FrameNodePort): void;
577
- private _movePortUp;
578
- moveFramePortDown(nodePort: FrameNodePort): void;
579
- private _movePortDown;
580
- private _initResizing;
581
- private _cleanUpResizing;
582
- private _updateMinHeightWithComments;
583
- private _isResizingTop;
584
- private _isResizingRight;
585
- private _isResizingBottom;
586
- private _isResizingLeft;
587
- private _onRightHandlePointerDown;
588
- private _onRightHandlePointerMove;
589
- private _moveRightHandle;
590
- private _onRightHandlePointerUp;
591
- private _onBottomHandlePointerDown;
592
- private _onBottomHandlePointerMove;
593
- private _moveBottomHandle;
594
- private _onBottomHandlePointerUp;
595
- private _onLeftHandlePointerDown;
596
- private _onLeftHandlePointerMove;
597
- private _moveLeftHandle;
598
- private _onLeftHandlePointerUp;
599
- private _onTopHandlePointerDown;
600
- private _onTopHandlePointerMove;
601
- private _moveTopHandle;
602
- private _onTopHandlePointerUp;
603
- private _onTopRightHandlePointerDown;
604
- private _onTopRightHandlePointerMove;
605
- private _moveTopRightHandle;
606
- private _onTopRightHandlePointerUp;
607
- private _onBottomRightHandlePointerDown;
608
- private _onBottomRightHandlePointerMove;
609
- private _moveBottomRightHandle;
610
- private _onBottomRightHandlePointerUp;
611
- private _onBottomLeftHandlePointerDown;
612
- private _onBottomLeftHandlePointerMove;
613
- private _moveBottomLeftHandle;
614
- private _onBottomLeftHandlePointerUp;
615
- private _onTopLeftHandlePointerDown;
616
- private _onTopLeftHandlePointerMove;
617
- private _moveTopLeftHandle;
618
- private _onTopLeftHandlePointerUp;
619
- private _expandLeft;
620
- private _expandTop;
621
- private _expandRight;
622
- private _expandBottom;
623
- dispose(): void;
624
- private _serializePortData;
625
- serialize(saveCollapsedState: boolean): IFrameData;
626
- export(): void;
627
- adjustPorts(): void;
628
- static Parse(serializationData: IFrameData, canvas: GraphCanvasComponent, map?: {
629
- [key: number]: number;
630
- }): GraphFrame;
631
- }
632
-
633
-
634
- /// <reference types="react" />
635
- export class GraphNode {
636
- block: BABYLON.NodeMaterialBlock;
637
- private _visual;
638
- private _headerContainer;
639
- private _promotionWarning;
640
- private _header;
641
- private _connections;
642
- private _inputsContainer;
643
- private _outputsContainer;
644
- private _content;
645
- private _comments;
646
- private _inputPorts;
647
- private _outputPorts;
648
- private _links;
649
- private _x;
650
- private _y;
651
- private _gridAlignedX;
652
- private _gridAlignedY;
653
- private _mouseStartPointX;
654
- private _mouseStartPointY;
655
- private _globalState;
656
- private _onSelectionChangedObserver;
657
- private _onSelectionBoxMovedObserver;
658
- private _onFrameCreatedObserver;
659
- private _onUpdateRequiredObserver;
660
- private _ownerCanvas;
661
- private _isSelected;
662
- private _displayManager;
663
- private _isVisible;
664
- private _enclosingFrameId;
665
- get isVisible(): boolean;
666
- set isVisible(value: boolean);
667
- private _upateNodePortNames;
668
- get outputPorts(): NodePort[];
669
- get inputPorts(): NodePort[];
670
- get links(): NodeLink[];
671
- get gridAlignedX(): number;
672
- get gridAlignedY(): number;
673
- get x(): number;
674
- set x(value: number);
675
- get y(): number;
676
- set y(value: number);
677
- get width(): number;
678
- get height(): number;
679
- get id(): number;
680
- get name(): string;
681
- get isSelected(): boolean;
682
- get enclosingFrameId(): number;
683
- set enclosingFrameId(value: number);
684
- set isSelected(value: boolean);
685
- setIsSelected(value: boolean, marqueeSelection: boolean): void;
686
- constructor(block: BABYLON.NodeMaterialBlock, globalState: GlobalState);
687
- isOverlappingFrame(frame: GraphFrame): boolean;
688
- getPortForConnectionPoint(point: BABYLON.NodeMaterialConnectionPoint): NodePort | null;
689
- getLinksForConnectionPoint(point: BABYLON.NodeMaterialConnectionPoint): NodeLink[];
690
- private _refreshFrames;
691
- _refreshLinks(): void;
692
- refresh(): void;
693
- private _onDown;
694
- cleanAccumulation(useCeil?: boolean): void;
695
- private _onUp;
696
- private _onMove;
697
- renderProperties(): BABYLON.Nullable<JSX.Element>;
698
- appendVisual(root: HTMLDivElement, owner: GraphCanvasComponent): void;
699
- dispose(): void;
700
- }
701
-
702
-
703
- export class NodeLink {
704
- private _graphCanvas;
705
- private _portA;
706
- private _portB?;
707
- private _nodeA;
708
- private _nodeB?;
709
- private _path;
710
- private _selectionPath;
711
- private _onSelectionChangedObserver;
712
- private _isVisible;
713
- onDisposedObservable: BABYLON.Observable<NodeLink>;
714
- get isVisible(): boolean;
715
- set isVisible(value: boolean);
716
- get portA(): NodePort | FrameNodePort;
717
- get portB(): NodePort | FrameNodePort | undefined;
718
- get nodeA(): GraphNode;
719
- get nodeB(): GraphNode | undefined;
720
- update(endX?: number, endY?: number, straight?: boolean): void;
721
- constructor(graphCanvas: GraphCanvasComponent, portA: NodePort, nodeA: GraphNode, portB?: NodePort, nodeB?: GraphNode);
722
- onClick(evt: MouseEvent): void;
723
- dispose(notify?: boolean): void;
724
- }
725
-
726
-
727
- export class NodePort {
728
- connectionPoint: BABYLON.NodeMaterialConnectionPoint;
729
- node: GraphNode;
730
- protected _element: HTMLDivElement;
731
- protected _img: HTMLImageElement;
732
- protected _globalState: GlobalState;
733
- protected _portLabelElement: Element;
734
- protected _onCandidateLinkMovedObserver: BABYLON.Nullable<BABYLON.Observer<BABYLON.Nullable<BABYLON.Vector2>>>;
735
- protected _onSelectionChangedObserver: BABYLON.Nullable<BABYLON.Observer<BABYLON.Nullable<ISelectionChangedOptions>>>;
736
- protected _exposedOnFrame: boolean;
737
- delegatedPort: BABYLON.Nullable<FrameNodePort>;
738
- get element(): HTMLDivElement;
739
- get portName(): string;
740
- set portName(newName: string);
741
- get disabled(): boolean;
742
- hasLabel(): boolean;
743
- get exposedOnFrame(): boolean;
744
- set exposedOnFrame(value: boolean);
745
- get exposedPortPosition(): number;
746
- set exposedPortPosition(value: number);
747
- private _isConnectedToNodeOutsideOfFrame;
748
- refresh(): void;
749
- constructor(portContainer: HTMLElement, connectionPoint: BABYLON.NodeMaterialConnectionPoint, node: GraphNode, globalState: GlobalState);
750
- dispose(): void;
751
- static CreatePortElement(connectionPoint: BABYLON.NodeMaterialConnectionPoint, node: GraphNode, root: HTMLElement, displayManager: BABYLON.Nullable<IDisplayManager>, globalState: GlobalState): NodePort;
752
- }
753
-
754
-
755
- export class ColorMergerPropertyTabComponent extends React.Component<IPropertyComponentProps> {
756
- constructor(props: IPropertyComponentProps);
757
- render(): JSX.Element;
758
- }
759
-
760
-
761
- export class ConditionalPropertyTabComponent extends React.Component<IPropertyComponentProps> {
762
- constructor(props: IPropertyComponentProps);
763
- render(): JSX.Element;
764
- }
765
-
766
-
767
- export interface IFrameNodePortPropertyTabComponentProps {
768
- globalState: GlobalState;
769
- frameNodePort: FrameNodePort;
770
- frame: GraphFrame;
771
- }
772
- export class FrameNodePortPropertyTabComponent extends React.Component<IFrameNodePortPropertyTabComponentProps, {
773
- port: FrameNodePort;
774
- }> {
775
- private _onFramePortPositionChangedObserver;
776
- private _onSelectionChangedObserver;
777
- constructor(props: IFrameNodePortPropertyTabComponentProps);
778
- componentWillUnmount(): void;
779
- render(): JSX.Element;
780
- }
781
-
782
-
783
- export interface IFramePropertyTabComponentProps {
784
- globalState: GlobalState;
785
- frame: GraphFrame;
786
- }
787
- export class FramePropertyTabComponent extends React.Component<IFramePropertyTabComponentProps> {
788
- private _onFrameExpandStateChangedObserver;
789
- constructor(props: IFramePropertyTabComponentProps);
790
- componentDidMount(): void;
791
- componentWillUnmount(): void;
792
- render(): JSX.Element;
793
- }
794
-
795
-
796
- export class GenericPropertyComponent extends React.Component<IPropertyComponentProps> {
797
- constructor(props: IPropertyComponentProps);
798
- render(): JSX.Element;
799
- }
800
- export class GeneralPropertyTabComponent extends React.Component<IPropertyComponentProps> {
801
- constructor(props: IPropertyComponentProps);
562
+ export class GeneralPropertyTabComponent extends React.Component<BABYLON.NodeEditor.SharedUIComponents.IPropertyComponentProps> {
563
+ constructor(props: BABYLON.NodeEditor.SharedUIComponents.IPropertyComponentProps);
802
564
  render(): JSX.Element;
803
565
  }
804
- export class GenericPropertyTabComponent extends React.Component<IPropertyComponentProps> {
805
- constructor(props: IPropertyComponentProps);
566
+ export class GenericPropertyTabComponent extends React.Component<BABYLON.NodeEditor.SharedUIComponents.IPropertyComponentProps> {
567
+ constructor(props: BABYLON.NodeEditor.SharedUIComponents.IPropertyComponentProps);
806
568
  forceRebuild(notifiers?: {
807
569
  rebuild?: boolean;
808
570
  update?: boolean;
@@ -813,9 +575,9 @@ declare module BABYLON.NodeEditor {
813
575
  }
814
576
 
815
577
 
816
- export class GradientPropertyTabComponent extends React.Component<IPropertyComponentProps> {
578
+ export class GradientPropertyTabComponent extends React.Component<BABYLON.NodeEditor.SharedUIComponents.IPropertyComponentProps> {
817
579
  private _onValueChangedObserver;
818
- constructor(props: IPropertyComponentProps);
580
+ constructor(props: BABYLON.NodeEditor.SharedUIComponents.IPropertyComponentProps);
819
581
  componentDidMount(): void;
820
582
  componentWillUnmount(): void;
821
583
  forceRebuild(): void;
@@ -828,7 +590,7 @@ declare module BABYLON.NodeEditor {
828
590
 
829
591
 
830
592
  interface IGradientStepComponentProps {
831
- globalState: GlobalState;
593
+ stateManager: BABYLON.NodeEditor.SharedUIComponents.StateManager;
832
594
  step: BABYLON.GradientBlockColorStep;
833
595
  lineIndex: number;
834
596
  onDelete: () => void;
@@ -847,12 +609,12 @@ declare module BABYLON.NodeEditor {
847
609
  }
848
610
 
849
611
 
850
- export class ImageSourcePropertyTabComponent extends React.Component<IPropertyComponentProps, {
612
+ export class ImageSourcePropertyTabComponent extends React.Component<BABYLON.NodeEditor.SharedUIComponents.IPropertyComponentProps, {
851
613
  isEmbedded: boolean;
852
614
  }> {
853
615
  get imageSourceBlock(): BABYLON.ImageSourceBlock;
854
- constructor(props: IPropertyComponentProps);
855
- UNSAFE_componentWillUpdate(nextProps: IPropertyComponentProps, nextState: {
616
+ constructor(props: BABYLON.NodeEditor.SharedUIComponents.IPropertyComponentProps);
617
+ UNSAFE_componentWillUpdate(nextProps: BABYLON.NodeEditor.SharedUIComponents.IPropertyComponentProps, nextState: {
856
618
  isEmbedded: boolean;
857
619
  loadAsCubeTexture: boolean;
858
620
  }): void;
@@ -870,9 +632,9 @@ declare module BABYLON.NodeEditor {
870
632
  }
871
633
 
872
634
 
873
- export class InputPropertyTabComponent extends React.Component<IPropertyComponentProps> {
635
+ export class InputPropertyTabComponent extends React.Component<BABYLON.NodeEditor.SharedUIComponents.IPropertyComponentProps> {
874
636
  private _onValueChangedObserver;
875
- constructor(props: IPropertyComponentProps);
637
+ constructor(props: BABYLON.NodeEditor.SharedUIComponents.IPropertyComponentProps);
876
638
  componentDidMount(): void;
877
639
  componentWillUnmount(): void;
878
640
  renderValue(globalState: GlobalState): JSX.Element | null;
@@ -881,19 +643,19 @@ declare module BABYLON.NodeEditor {
881
643
  }
882
644
 
883
645
 
884
- export class LightInformationPropertyTabComponent extends React.Component<IPropertyComponentProps> {
646
+ export class LightInformationPropertyTabComponent extends React.Component<BABYLON.NodeEditor.SharedUIComponents.IPropertyComponentProps> {
885
647
  render(): JSX.Element;
886
648
  }
887
649
 
888
650
 
889
- export class LightPropertyTabComponent extends React.Component<IPropertyComponentProps> {
651
+ export class LightPropertyTabComponent extends React.Component<BABYLON.NodeEditor.SharedUIComponents.IPropertyComponentProps> {
890
652
  render(): JSX.Element;
891
653
  }
892
654
 
893
655
 
894
656
  export interface IFrameNodePortPropertyTabComponentProps {
895
- globalState: GlobalState;
896
- nodePort: NodePort;
657
+ stateManager: BABYLON.NodeEditor.SharedUIComponents.StateManager;
658
+ nodePort: BABYLON.NodeEditor.SharedUIComponents.NodePort;
897
659
  }
898
660
  export class NodePortPropertyTabComponent extends React.Component<IFrameNodePortPropertyTabComponentProps> {
899
661
  private _onSelectionChangedObserver;
@@ -904,22 +666,16 @@ declare module BABYLON.NodeEditor {
904
666
  }
905
667
 
906
668
 
907
- export interface IPropertyComponentProps {
908
- globalState: GlobalState;
909
- block: BABYLON.NodeMaterialBlock;
910
- }
911
-
912
-
913
669
  type ReflectionTexture = BABYLON.ReflectionTextureBlock | BABYLON.ReflectionBlock | BABYLON.RefractionBlock;
914
670
  type AnyTexture = BABYLON.TextureBlock | ReflectionTexture | BABYLON.CurrentScreenBlock | BABYLON.ParticleTextureBlock;
915
- export class TexturePropertyTabComponent extends React.Component<IPropertyComponentProps, {
671
+ export class TexturePropertyTabComponent extends React.Component<BABYLON.NodeEditor.SharedUIComponents.IPropertyComponentProps, {
916
672
  isEmbedded: boolean;
917
673
  loadAsCubeTexture: boolean;
918
674
  textureIsPrefiltered: boolean;
919
675
  }> {
920
676
  get textureBlock(): AnyTexture;
921
- constructor(props: IPropertyComponentProps);
922
- UNSAFE_componentWillUpdate(nextProps: IPropertyComponentProps, nextState: {
677
+ constructor(props: BABYLON.NodeEditor.SharedUIComponents.IPropertyComponentProps);
678
+ UNSAFE_componentWillUpdate(nextProps: BABYLON.NodeEditor.SharedUIComponents.IPropertyComponentProps, nextState: {
923
679
  isEmbedded: boolean;
924
680
  loadAsCubeTexture: boolean;
925
681
  }): void;
@@ -937,177 +693,51 @@ declare module BABYLON.NodeEditor {
937
693
  }
938
694
 
939
695
 
940
- export class TransformPropertyTabComponent extends React.Component<IPropertyComponentProps> {
941
- constructor(props: IPropertyComponentProps);
696
+ export class TransformPropertyTabComponent extends React.Component<BABYLON.NodeEditor.SharedUIComponents.IPropertyComponentProps> {
697
+ constructor(props: BABYLON.NodeEditor.SharedUIComponents.IPropertyComponentProps);
942
698
  render(): JSX.Element;
943
699
  }
944
700
 
945
701
 
946
- export class TrigonometryPropertyTabComponent extends React.Component<IPropertyComponentProps> {
947
- constructor(props: IPropertyComponentProps);
702
+ export class TrigonometryPropertyTabComponent extends React.Component<BABYLON.NodeEditor.SharedUIComponents.IPropertyComponentProps> {
703
+ constructor(props: BABYLON.NodeEditor.SharedUIComponents.IPropertyComponentProps);
948
704
  render(): JSX.Element;
949
705
  }
950
706
 
951
707
 
952
- export class VectorMergerPropertyTabComponent extends React.Component<IPropertyComponentProps> {
953
- constructor(props: IPropertyComponentProps);
708
+ export class VectorMergerPropertyTabComponent extends React.Component<BABYLON.NodeEditor.SharedUIComponents.IPropertyComponentProps> {
709
+ constructor(props: BABYLON.NodeEditor.SharedUIComponents.IPropertyComponentProps);
954
710
  render(): JSX.Element;
955
711
  }
956
712
 
957
713
 
958
- export class PropertyLedger {
959
- static RegisteredControls: {
960
- [key: string]: React.ComponentClass<IPropertyComponentProps>;
961
- };
962
- }
714
+ export const RegisterDefaultInput: (stateManager: BABYLON.NodeEditor.SharedUIComponents.StateManager) => void;
963
715
 
964
716
 
965
- export class ISelectionChangedOptions {
966
- selection: BABYLON.Nullable<GraphNode | NodeLink | GraphFrame | NodePort | FramePortData>;
967
- forceKeepSelection?: boolean;
968
- marqueeSelection?: boolean;
969
- }
970
- export class GlobalState {
971
- nodeMaterial: BABYLON.NodeMaterial;
972
- hostElement: HTMLElement;
973
- hostDocument: HTMLDocument;
974
- hostWindow: Window;
975
- onNewNodeCreatedObservable: BABYLON.Observable<GraphNode>;
976
- onSelectionChangedObservable: BABYLON.Observable<BABYLON.Nullable<ISelectionChangedOptions>>;
977
- onRebuildRequiredObservable: BABYLON.Observable<boolean>;
978
- onBuiltObservable: BABYLON.Observable<void>;
979
- onResetRequiredObservable: BABYLON.Observable<void>;
980
- onUpdateRequiredObservable: BABYLON.Observable<BABYLON.Nullable<BABYLON.NodeMaterialBlock>>;
981
- onZoomToFitRequiredObservable: BABYLON.Observable<void>;
982
- onReOrganizedRequiredObservable: BABYLON.Observable<void>;
983
- onLogRequiredObservable: BABYLON.Observable<LogEntry>;
984
- onErrorMessageDialogRequiredObservable: BABYLON.Observable<string>;
985
- onIsLoadingChanged: BABYLON.Observable<boolean>;
986
- onPreviewCommandActivated: BABYLON.Observable<boolean>;
987
- onLightUpdated: BABYLON.Observable<void>;
988
- onPreviewBackgroundChanged: BABYLON.Observable<void>;
989
- onBackFaceCullingChanged: BABYLON.Observable<void>;
990
- onDepthPrePassChanged: BABYLON.Observable<void>;
991
- onAnimationCommandActivated: BABYLON.Observable<void>;
992
- onCandidateLinkMoved: BABYLON.Observable<BABYLON.Nullable<BABYLON.Vector2>>;
993
- onSelectionBoxMoved: BABYLON.Observable<ClientRect | DOMRect>;
994
- onFrameCreatedObservable: BABYLON.Observable<GraphFrame>;
995
- onCandidatePortSelectedObservable: BABYLON.Observable<BABYLON.Nullable<NodePort | FrameNodePort>>;
996
- onImportFrameObservable: BABYLON.Observable<any>;
997
- onGraphNodeRemovalObservable: BABYLON.Observable<GraphNode>;
998
- onPopupClosedObservable: BABYLON.Observable<void>;
999
- onNewBlockRequiredObservable: BABYLON.Observable<{
1000
- type: string;
1001
- targetX: number;
1002
- targetY: number;
1003
- needRepositioning?: boolean | undefined;
1004
- }>;
1005
- onGetNodeFromBlock: (block: BABYLON.NodeMaterialBlock) => GraphNode;
1006
- onGridSizeChanged: BABYLON.Observable<void>;
1007
- onExposePortOnFrameObservable: BABYLON.Observable<GraphNode>;
1008
- previewType: PreviewType;
1009
- previewFile: File;
1010
- particleSystemBlendMode: number;
1011
- listOfCustomPreviewFiles: File[];
1012
- rotatePreview: boolean;
1013
- backgroundColor: BABYLON.Color4;
1014
- backFaceCulling: boolean;
1015
- depthPrePass: boolean;
1016
- blockKeyboardEvents: boolean;
1017
- hemisphericLight: boolean;
1018
- directionalLight0: boolean;
1019
- directionalLight1: boolean;
1020
- controlCamera: boolean;
1021
- storeEditorData: (serializationObject: any, frame?: BABYLON.Nullable<GraphFrame>) => void;
1022
- _mode: BABYLON.NodeMaterialModes;
1023
- /** Gets the mode */
1024
- get mode(): BABYLON.NodeMaterialModes;
1025
- /** Sets the mode */
1026
- set mode(m: BABYLON.NodeMaterialModes);
1027
- customSave?: {
1028
- label: string;
1029
- action: (data: string) => Promise<void>;
1030
- };
1031
- constructor();
1032
- }
1033
-
1034
-
1035
- interface IGraphEditorProps {
1036
- globalState: GlobalState;
1037
- }
1038
- interface IGraphEditorState {
1039
- showPreviewPopUp: boolean;
1040
- }
1041
- interface IInternalPreviewAreaOptions extends BABYLON.IInspectorOptions {
1042
- popup: boolean;
1043
- original: boolean;
1044
- explorerWidth?: string;
1045
- inspectorWidth?: string;
1046
- embedHostWidth?: string;
1047
- }
1048
- export class GraphEditor extends React.Component<IGraphEditorProps, IGraphEditorState> {
1049
- static readonly NodeWidth = 100;
1050
- private _graphCanvasRef;
1051
- private _diagramContainerRef;
1052
- private _graphCanvas;
1053
- private _diagramContainer;
1054
- private _startX;
1055
- private _moveInProgress;
1056
- private _leftWidth;
1057
- private _rightWidth;
1058
- private _blocks;
1059
- private _previewManager;
1060
- private _copiedNodes;
1061
- private _copiedFrames;
1062
- private _mouseLocationX;
1063
- private _mouseLocationY;
1064
- private _onWidgetKeyUpPointer;
1065
- private _previewHost;
1066
- private _popUpWindow;
1067
- /**
1068
- * Creates a node and recursivly creates its parent nodes from it's input
1069
- * @param block
1070
- * @param recursion
1071
- */
1072
- createNodeFromObject(block: BABYLON.NodeMaterialBlock, recursion?: boolean): GraphNode;
1073
- addValueNode(type: string): GraphNode;
1074
- componentDidMount(): void;
1075
- componentWillUnmount(): void;
1076
- constructor(props: IGraphEditorProps);
1077
- reconnectNewNodes(nodeIndex: number, newNodes: GraphNode[], sourceNodes: GraphNode[], done: boolean[]): void;
1078
- pasteSelection(copiedNodes: GraphNode[], currentX: number, currentY: number, selectNew?: boolean): GraphNode[] | undefined;
1079
- zoomToFit(): void;
1080
- buildMaterial(autoConfigure?: boolean): void;
1081
- build(): void;
1082
- loadGraph(): void;
1083
- showWaitScreen(): void;
1084
- hideWaitScreen(): void;
1085
- reOrganize(editorData?: BABYLON.Nullable<IEditorData>, isImportingAFrame?: boolean): void;
1086
- onPointerDown(evt: React.PointerEvent<HTMLDivElement>): void;
1087
- onPointerUp(evt: React.PointerEvent<HTMLDivElement>): void;
1088
- onWheel(this: any, evt: WheelEvent): void;
1089
- resizeColumns(evt: React.PointerEvent<HTMLDivElement>, forLeft?: boolean): void;
1090
- buildColumnLayout(): string;
1091
- emitNewBlock(blockType: string, targetX: number, targetY: number): void;
1092
- dropNewBlock(event: React.DragEvent<HTMLDivElement>): void;
1093
- handlePopUp: () => void;
1094
- handleClosingPopUp: () => void;
1095
- initiatePreviewArea: (canvas?: HTMLCanvasElement) => void;
1096
- createPopUp: () => void;
1097
- createPopupWindow: (title: string, windowVariableName: string, width?: number, height?: number) => Window | null;
1098
- createPreviewMeshControlHost: (options: IInternalPreviewAreaOptions, parentControl: BABYLON.Nullable<HTMLElement>) => void;
1099
- createPreviewHost: (options: IInternalPreviewAreaOptions, parentControl: BABYLON.Nullable<HTMLElement>) => void;
1100
- fixPopUpStyles: (document: Document) => void;
1101
- render(): JSX.Element;
1102
- }
1103
-
1104
-
1105
-
1106
-
1107
- /**
1108
- * Interface used to specify creation options for the node editor
1109
- */
1110
- export interface INodeEditorOptions {
717
+ export const RegisterElbowSupport: (stateManager: BABYLON.NodeEditor.SharedUIComponents.StateManager) => void;
718
+
719
+
720
+ export const RegisterExportData: (stateManager: BABYLON.NodeEditor.SharedUIComponents.StateManager) => void;
721
+
722
+
723
+ export const RegisterNodePortDesign: (stateManager: BABYLON.NodeEditor.SharedUIComponents.StateManager) => void;
724
+
725
+
726
+ export const RegisterToDisplayManagers: () => void;
727
+
728
+
729
+ export const RegisterToPropertyTabManagers: () => void;
730
+
731
+
732
+ export const RegisterTypeLedger: () => void;
733
+
734
+
735
+
736
+
737
+ /**
738
+ * Interface used to specify creation options for the node editor
739
+ */
740
+ export interface INodeEditorOptions {
1111
741
  nodeMaterial: BABYLON.NodeMaterial;
1112
742
  hostElement?: HTMLElement;
1113
743
  customSave?: {
@@ -1129,34 +759,6 @@ declare module BABYLON.NodeEditor {
1129
759
  }
1130
760
 
1131
761
 
1132
- export interface INodeLocationInfo {
1133
- blockId: number;
1134
- x: number;
1135
- y: number;
1136
- }
1137
- export interface IFrameData {
1138
- x: number;
1139
- y: number;
1140
- width: number;
1141
- height: number;
1142
- color: number[];
1143
- name: string;
1144
- isCollapsed: boolean;
1145
- blocks: number[];
1146
- comments: string;
1147
- }
1148
- export interface IEditorData {
1149
- locations: INodeLocationInfo[];
1150
- x: number;
1151
- y: number;
1152
- zoom: number;
1153
- frames?: IFrameData[];
1154
- map?: {
1155
- [key: number]: number;
1156
- };
1157
- }
1158
-
1159
-
1160
762
  interface IPortalProps {
1161
763
  globalState: GlobalState;
1162
764
  }
@@ -1166,24 +768,13 @@ declare module BABYLON.NodeEditor {
1166
768
 
1167
769
 
1168
770
  export class SerializationTools {
1169
- static UpdateLocations(material: BABYLON.NodeMaterial, globalState: GlobalState, frame?: BABYLON.Nullable<GraphFrame>): void;
1170
- static Serialize(material: BABYLON.NodeMaterial, globalState: GlobalState, frame?: BABYLON.Nullable<GraphFrame>): string;
771
+ static UpdateLocations(material: BABYLON.NodeMaterial, globalState: GlobalState, frame?: BABYLON.Nullable<BABYLON.NodeEditor.SharedUIComponents.GraphFrame>): void;
772
+ static Serialize(material: BABYLON.NodeMaterial, globalState: GlobalState, frame?: BABYLON.Nullable<BABYLON.NodeEditor.SharedUIComponents.GraphFrame>): string;
1171
773
  static Deserialize(serializationObject: any, globalState: GlobalState): void;
1172
774
  static AddFrameToMaterial(serializationObject: any, globalState: GlobalState, currentMaterial: BABYLON.NodeMaterial): void;
1173
775
  }
1174
776
 
1175
777
 
1176
- export interface IButtonLineComponentProps {
1177
- label: string;
1178
- onClick: () => void;
1179
- isDisabled?: boolean;
1180
- }
1181
- export class ButtonLineComponent extends React.Component<IButtonLineComponentProps> {
1182
- constructor(props: IButtonLineComponentProps);
1183
- render(): JSX.Element;
1184
- }
1185
-
1186
-
1187
778
  export interface ICheckBoxLineComponentProps {
1188
779
  label: string;
1189
780
  target?: any;
@@ -1211,51 +802,6 @@ declare module BABYLON.NodeEditor {
1211
802
  }
1212
803
 
1213
804
 
1214
- export interface IColor3LineComponentProps {
1215
- label: string;
1216
- target: any;
1217
- propertyName: string;
1218
- onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
1219
- onChange?: () => void;
1220
- globalState: GlobalState;
1221
- }
1222
- interface IColor3LineComponentState {
1223
- isExpanded: boolean;
1224
- }
1225
- export class Color3LineComponent extends React.Component<IColor3LineComponentProps, IColor3LineComponentState> {
1226
- constructor(props: IColor3LineComponentProps);
1227
- onChange(newValue: string): void;
1228
- switchExpandState(): void;
1229
- updateColor(newValue: BABYLON.Color3 | BABYLON.Color4): void;
1230
- modifyColor(modifier: (previous: BABYLON.Color3 | BABYLON.Color4) => void): void;
1231
- getCurrentColor(): BABYLON.Color3 | BABYLON.Color4;
1232
- copyToClipboard(): void;
1233
- render(): JSX.Element;
1234
- }
1235
-
1236
-
1237
- export interface IColor4LineComponentProps {
1238
- label: string;
1239
- target: any;
1240
- propertyName: string;
1241
- onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
1242
- onChange?: () => void;
1243
- globalState: GlobalState;
1244
- }
1245
- export class Color4LineComponent extends React.Component<IColor4LineComponentProps, {
1246
- isExpanded: boolean;
1247
- }> {
1248
- constructor(props: IColor4LineComponentProps);
1249
- onChange(newValue: string): void;
1250
- switchExpandState(): void;
1251
- updateColor(newValue: BABYLON.Color4): void;
1252
- modifyColor(modifier: (previous: BABYLON.Color4) => void): void;
1253
- getCurrentColor(): BABYLON.Color4;
1254
- copyToClipboard(): void;
1255
- render(): JSX.Element;
1256
- }
1257
-
1258
-
1259
805
  export interface IColorPickerComponentProps {
1260
806
  value: BABYLON.Color4 | BABYLON.Color3;
1261
807
  onColorChanged: (newOne: string) => void;
@@ -1386,37 +932,6 @@ declare module BABYLON.NodeEditor {
1386
932
  }
1387
933
 
1388
934
 
1389
- interface IMatrixLineComponentProps {
1390
- label: string;
1391
- target: any;
1392
- propertyName: string;
1393
- step?: number;
1394
- onChange?: (newValue: BABYLON.Matrix) => void;
1395
- onModeChange?: (mode: number) => void;
1396
- onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
1397
- mode?: number;
1398
- globalState: GlobalState;
1399
- }
1400
- export class MatrixLineComponent extends React.Component<IMatrixLineComponentProps, {
1401
- value: BABYLON.Matrix;
1402
- mode: number;
1403
- angle: number;
1404
- }> {
1405
- private _localChange;
1406
- constructor(props: IMatrixLineComponentProps);
1407
- shouldComponentUpdate(nextProps: IMatrixLineComponentProps, nextState: {
1408
- value: BABYLON.Matrix;
1409
- mode: number;
1410
- angle: number;
1411
- }): boolean;
1412
- raiseOnPropertyChanged(previousValue: BABYLON.Vector3): void;
1413
- updateMatrix(): void;
1414
- updateRow(value: BABYLON.Vector4, row: number): void;
1415
- updateBasedOnMode(value: number): void;
1416
- render(): JSX.Element;
1417
- }
1418
-
1419
-
1420
935
  interface IMessageDialogComponentProps {
1421
936
  globalState: GlobalState;
1422
937
  }
@@ -1452,35 +967,6 @@ declare module BABYLON.NodeEditor {
1452
967
  }
1453
968
 
1454
969
 
1455
- interface IOptionsLineComponentProps {
1456
- label: string;
1457
- target: any;
1458
- className?: string;
1459
- propertyName?: string;
1460
- options: BABYLON.IInspectableOptions[];
1461
- noDirectUpdate?: boolean;
1462
- onSelect?: (value: number | string) => void;
1463
- onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
1464
- valuesAreStrings?: boolean;
1465
- defaultIfNull?: number;
1466
- getSelection?: (target: any) => number;
1467
- }
1468
- export class OptionsLineComponent extends React.Component<IOptionsLineComponentProps, {
1469
- value: number | string;
1470
- }> {
1471
- private _localChange;
1472
- private _getValue;
1473
- constructor(props: IOptionsLineComponentProps);
1474
- setValue(value: string | number): void;
1475
- shouldComponentUpdate(nextProps: IOptionsLineComponentProps, nextState: {
1476
- value: number;
1477
- }): boolean;
1478
- raiseOnPropertyChanged(newValue: number | string, previousValue: number | string): void;
1479
- updateValue(valueString: string): void;
1480
- render(): JSX.Element;
1481
- }
1482
-
1483
-
1484
970
  export class Popup {
1485
971
  static CreatePopup(title: string, windowVariableName: string, width?: number, height?: number): HTMLDivElement | null;
1486
972
  static _CopyStyles(sourceDoc: HTMLDocument, targetDoc: HTMLDocument): void;
@@ -1525,34 +1011,7 @@ declare module BABYLON.NodeEditor {
1525
1011
  }
1526
1012
 
1527
1013
 
1528
- interface ITextInputLineComponentProps {
1529
- label: string;
1530
- globalState: GlobalState;
1531
- target?: any;
1532
- propertyName?: string;
1533
- value?: string;
1534
- multilines?: boolean;
1535
- onChange?: (value: string) => void;
1536
- validator?: (value: string) => boolean;
1537
- onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
1538
- }
1539
- export class TextInputLineComponent extends React.Component<ITextInputLineComponentProps, {
1540
- value: string;
1541
- }> {
1542
- private _localChange;
1543
- private _onFocus;
1544
- constructor(props: ITextInputLineComponentProps);
1545
- shouldComponentUpdate(nextProps: ITextInputLineComponentProps, nextState: {
1546
- value: string;
1547
- }): boolean;
1548
- componentWillUnmount(): void;
1549
- raiseOnPropertyChanged(newValue: string, previousValue: string): void;
1550
- updateValue(value: string, raisePropertyChanged: boolean): void;
1551
- render(): JSX.Element;
1552
- }
1553
-
1554
-
1555
- interface ITextLineComponentProps {
1014
+ interface ITextLineComponentProps {
1556
1015
  label: string;
1557
1016
  value: string;
1558
1017
  color?: string;
@@ -1593,102 +1052,6 @@ declare module BABYLON.NodeEditor {
1593
1052
  }
1594
1053
 
1595
1054
 
1596
- interface IVector2LineComponentProps {
1597
- label: string;
1598
- target: any;
1599
- propertyName: string;
1600
- step?: number;
1601
- onChange?: (newvalue: BABYLON.Vector2) => void;
1602
- onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
1603
- globalState: GlobalState;
1604
- }
1605
- export class Vector2LineComponent extends React.Component<IVector2LineComponentProps, {
1606
- isExpanded: boolean;
1607
- value: BABYLON.Vector2;
1608
- }> {
1609
- static defaultProps: {
1610
- step: number;
1611
- };
1612
- private _localChange;
1613
- constructor(props: IVector2LineComponentProps);
1614
- shouldComponentUpdate(nextProps: IVector2LineComponentProps, nextState: {
1615
- isExpanded: boolean;
1616
- value: BABYLON.Vector2;
1617
- }): boolean;
1618
- switchExpandState(): void;
1619
- raiseOnPropertyChanged(previousValue: BABYLON.Vector2): void;
1620
- updateStateX(value: number): void;
1621
- updateStateY(value: number): void;
1622
- render(): JSX.Element;
1623
- }
1624
-
1625
-
1626
- interface IVector3LineComponentProps {
1627
- label: string;
1628
- target: any;
1629
- propertyName: string;
1630
- step?: number;
1631
- onChange?: (newvalue: BABYLON.Vector3) => void;
1632
- onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
1633
- globalState: GlobalState;
1634
- }
1635
- export class Vector3LineComponent extends React.Component<IVector3LineComponentProps, {
1636
- isExpanded: boolean;
1637
- value: BABYLON.Vector3;
1638
- }> {
1639
- static defaultProps: {
1640
- step: number;
1641
- };
1642
- private _localChange;
1643
- constructor(props: IVector3LineComponentProps);
1644
- shouldComponentUpdate(nextProps: IVector3LineComponentProps, nextState: {
1645
- isExpanded: boolean;
1646
- value: BABYLON.Vector3;
1647
- }): boolean;
1648
- switchExpandState(): void;
1649
- raiseOnPropertyChanged(previousValue: BABYLON.Vector3): void;
1650
- updateVector3(): void;
1651
- updateStateX(value: number): void;
1652
- updateStateY(value: number): void;
1653
- updateStateZ(value: number): void;
1654
- render(): JSX.Element;
1655
- }
1656
-
1657
-
1658
- interface IVector4LineComponentProps {
1659
- label: string;
1660
- target?: any;
1661
- propertyName?: string;
1662
- value?: BABYLON.Vector4;
1663
- step?: number;
1664
- onChange?: (newvalue: BABYLON.Vector4) => void;
1665
- onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
1666
- globalState: GlobalState;
1667
- }
1668
- export class Vector4LineComponent extends React.Component<IVector4LineComponentProps, {
1669
- isExpanded: boolean;
1670
- value: BABYLON.Vector4;
1671
- }> {
1672
- static defaultProps: {
1673
- step: number;
1674
- };
1675
- private _localChange;
1676
- constructor(props: IVector4LineComponentProps);
1677
- shouldComponentUpdate(nextProps: IVector4LineComponentProps, nextState: {
1678
- isExpanded: boolean;
1679
- value: BABYLON.Vector4;
1680
- }): boolean;
1681
- switchExpandState(): void;
1682
- raiseOnPropertyChanged(previousValue: BABYLON.Vector4): void;
1683
- updateVector4(): void;
1684
- updateStateX(value: number): void;
1685
- updateStateY(value: number): void;
1686
- updateStateZ(value: number): void;
1687
- updateStateW(value: number): void;
1688
- render(): JSX.Element;
1689
- }
1690
-
1691
-
1692
1055
 
1693
1056
  }
1694
1057
  declare module BABYLON.NodeEditor.SharedUIComponents {
@@ -1876,6 +1239,7 @@ declare module BABYLON.NodeEditor.SharedUIComponents {
1876
1239
  onClick: () => void;
1877
1240
  icon?: string;
1878
1241
  iconLabel?: string;
1242
+ isDisabled?: boolean;
1879
1243
  }
1880
1244
  export class ButtonLineComponent extends React.Component<IButtonLineComponentProps> {
1881
1245
  constructor(props: IButtonLineComponentProps);
@@ -1938,7 +1302,7 @@ declare module BABYLON.NodeEditor.SharedUIComponents {
1938
1302
  icon?: string;
1939
1303
  lockObject?: BABYLON.NodeEditor.SharedUIComponents.LockObject;
1940
1304
  iconLabel?: string;
1941
- onValueChange?: (value: string) => void;
1305
+ onChange?: () => void;
1942
1306
  }
1943
1307
  export class Color3LineComponent extends React.Component<IColor3LineComponentProps> {
1944
1308
  render(): JSX.Element;
@@ -2333,6 +1697,42 @@ declare module BABYLON.NodeEditor.SharedUIComponents {
2333
1697
 
2334
1698
 
2335
1699
 
1700
+ }
1701
+ declare module BABYLON.NodeEditor {
1702
+
1703
+ }
1704
+ declare module BABYLON.NodeEditor.SharedUIComponents {
1705
+ interface IMatrixLineComponentProps {
1706
+ label: string;
1707
+ target: any;
1708
+ propertyName: string;
1709
+ step?: number;
1710
+ onChange?: (newValue: BABYLON.Matrix) => void;
1711
+ onModeChange?: (mode: number) => void;
1712
+ onPropertyChangedObservable?: BABYLON.Observable<BABYLON.NodeEditor.SharedUIComponents.PropertyChangedEvent>;
1713
+ mode?: number;
1714
+ }
1715
+ export class MatrixLineComponent extends React.Component<IMatrixLineComponentProps, {
1716
+ value: BABYLON.Matrix;
1717
+ mode: number;
1718
+ angle: number;
1719
+ }> {
1720
+ private _localChange;
1721
+ constructor(props: IMatrixLineComponentProps);
1722
+ shouldComponentUpdate(nextProps: IMatrixLineComponentProps, nextState: {
1723
+ value: BABYLON.Matrix;
1724
+ mode: number;
1725
+ angle: number;
1726
+ }): boolean;
1727
+ raiseOnPropertyChanged(previousValue: BABYLON.Vector3): void;
1728
+ updateMatrix(): void;
1729
+ updateRow(value: BABYLON.Vector4, row: number): void;
1730
+ updateBasedOnMode(value: number): void;
1731
+ render(): JSX.Element;
1732
+ }
1733
+
1734
+
1735
+
2336
1736
  }
2337
1737
  declare module BABYLON.NodeEditor {
2338
1738
 
@@ -2394,24 +1794,29 @@ declare module BABYLON.NodeEditor.SharedUIComponents {
2394
1794
  propertyName: string;
2395
1795
  options: BABYLON.IInspectableOptions[];
2396
1796
  noDirectUpdate?: boolean;
2397
- onSelect?: (value: number) => void;
2398
- extractValue?: () => number;
1797
+ onSelect?: (value: number | string) => void;
1798
+ extractValue?: (target: any) => number | string;
2399
1799
  onPropertyChangedObservable?: BABYLON.Observable<BABYLON.NodeEditor.SharedUIComponents.PropertyChangedEvent>;
2400
1800
  allowNullValue?: boolean;
2401
1801
  icon?: string;
2402
1802
  iconLabel?: string;
1803
+ className?: string;
1804
+ valuesAreStrings?: boolean;
1805
+ defaultIfNull?: number;
2403
1806
  }
2404
1807
  export class OptionsLineComponent extends React.Component<IOptionsLineComponentProps, {
2405
- value: number;
1808
+ value: number | string;
2406
1809
  }> {
2407
1810
  private _localChange;
2408
1811
  private _remapValueIn;
2409
1812
  private _remapValueOut;
1813
+ private _getValue;
2410
1814
  constructor(props: IOptionsLineComponentProps);
2411
1815
  shouldComponentUpdate(nextProps: IOptionsLineComponentProps, nextState: {
2412
1816
  value: number;
2413
1817
  }): boolean;
2414
1818
  raiseOnPropertyChanged(newValue: number, previousValue: number): void;
1819
+ setValue(value: string | number): void;
2415
1820
  updateValue(valueString: string): void;
2416
1821
  render(): JSX.Element;
2417
1822
  }
@@ -2540,6 +1945,8 @@ declare module BABYLON.NodeEditor.SharedUIComponents {
2540
1945
  max?: number;
2541
1946
  placeholder?: string;
2542
1947
  unit?: React.ReactNode;
1948
+ validator?: (value: string) => boolean;
1949
+ multilines?: boolean;
2543
1950
  }
2544
1951
  export class TextInputLineComponent extends React.Component<ITextInputLineComponentProps, {
2545
1952
  value: string;
@@ -2711,14 +2118,15 @@ declare module BABYLON.NodeEditor {
2711
2118
  declare module BABYLON.NodeEditor.SharedUIComponents {
2712
2119
  interface IVector4LineComponentProps {
2713
2120
  label: string;
2714
- target: any;
2715
- propertyName: string;
2121
+ target?: any;
2122
+ propertyName?: string;
2716
2123
  step?: number;
2717
2124
  onChange?: (newvalue: BABYLON.Vector4) => void;
2718
2125
  useEuler?: boolean;
2719
2126
  onPropertyChangedObservable?: BABYLON.Observable<BABYLON.NodeEditor.SharedUIComponents.PropertyChangedEvent>;
2720
2127
  icon?: string;
2721
2128
  iconLabel?: string;
2129
+ value?: BABYLON.Vector4;
2722
2130
  }
2723
2131
  export class Vector4LineComponent extends React.Component<IVector4LineComponentProps, {
2724
2132
  isExpanded: boolean;
@@ -2746,6 +2154,667 @@ declare module BABYLON.NodeEditor.SharedUIComponents {
2746
2154
 
2747
2155
 
2748
2156
 
2157
+ }
2158
+ declare module BABYLON.NodeEditor {
2159
+
2160
+ }
2161
+ declare module BABYLON.NodeEditor.SharedUIComponents {
2162
+ export class DisplayLedger {
2163
+ static RegisteredControls: {
2164
+ [key: string]: any;
2165
+ };
2166
+ }
2167
+
2168
+
2169
+
2170
+ }
2171
+ declare module BABYLON.NodeEditor {
2172
+
2173
+ }
2174
+ declare module BABYLON.NodeEditor.SharedUIComponents {
2175
+ export class FrameNodePort extends BABYLON.NodeEditor.SharedUIComponents.NodePort {
2176
+ portData: BABYLON.NodeEditor.SharedUIComponents.IPortData;
2177
+ node: BABYLON.NodeEditor.SharedUIComponents.GraphNode;
2178
+ private _parentFrameId;
2179
+ private _isInput;
2180
+ private _framePortPosition;
2181
+ private _framePortId;
2182
+ private _onFramePortPositionChangedObservable;
2183
+ get parentFrameId(): number;
2184
+ get onFramePortPositionChangedObservable(): BABYLON.Observable<FrameNodePort>;
2185
+ get isInput(): boolean;
2186
+ get framePortId(): number;
2187
+ get framePortPosition(): BABYLON.NodeEditor.SharedUIComponents.FramePortPosition;
2188
+ set framePortPosition(position: BABYLON.NodeEditor.SharedUIComponents.FramePortPosition);
2189
+ constructor(portContainer: HTMLElement, portData: BABYLON.NodeEditor.SharedUIComponents.IPortData, node: BABYLON.NodeEditor.SharedUIComponents.GraphNode, stateManager: BABYLON.NodeEditor.SharedUIComponents.StateManager, isInput: boolean, framePortId: number, parentFrameId: number);
2190
+ static CreateFrameNodePortElement(portData: BABYLON.NodeEditor.SharedUIComponents.IPortData, node: BABYLON.NodeEditor.SharedUIComponents.GraphNode, root: HTMLElement, displayManager: BABYLON.Nullable<BABYLON.NodeEditor.SharedUIComponents.IDisplayManager>, stateManager: BABYLON.NodeEditor.SharedUIComponents.StateManager, isInput: boolean, framePortId: number, parentFrameId: number): FrameNodePort;
2191
+ }
2192
+
2193
+
2194
+
2195
+ }
2196
+ declare module BABYLON.NodeEditor {
2197
+
2198
+ }
2199
+ declare module BABYLON.NodeEditor.SharedUIComponents {
2200
+ export interface IGraphCanvasComponentProps {
2201
+ stateManager: BABYLON.NodeEditor.SharedUIComponents.StateManager;
2202
+ onEmitNewNode: (nodeData: BABYLON.NodeEditor.SharedUIComponents.INodeData) => BABYLON.NodeEditor.SharedUIComponents.GraphNode;
2203
+ }
2204
+ export class GraphCanvasComponent extends React.Component<IGraphCanvasComponentProps> implements BABYLON.NodeEditor.SharedUIComponents.INodeContainer {
2205
+ private readonly _minZoom;
2206
+ private readonly _maxZoom;
2207
+ private _hostCanvas;
2208
+ private _graphCanvas;
2209
+ private _selectionContainer;
2210
+ private _frameContainer;
2211
+ private _svgCanvas;
2212
+ private _rootContainer;
2213
+ private _nodes;
2214
+ private _links;
2215
+ private _mouseStartPointX;
2216
+ private _mouseStartPointY;
2217
+ private _dropPointX;
2218
+ private _dropPointY;
2219
+ private _selectionStartX;
2220
+ private _selectionStartY;
2221
+ private _candidateLinkedHasMoved;
2222
+ private _x;
2223
+ private _y;
2224
+ private _zoom;
2225
+ private _selectedNodes;
2226
+ private _selectedLink;
2227
+ private _selectedPort;
2228
+ private _candidateLink;
2229
+ private _candidatePort;
2230
+ private _gridSize;
2231
+ private _selectionBox;
2232
+ private _selectedFrames;
2233
+ private _frameCandidate;
2234
+ private _frames;
2235
+ private _nodeDataContentList;
2236
+ private _altKeyIsPressed;
2237
+ private _multiKeyIsPressed;
2238
+ private _oldY;
2239
+ _frameIsMoving: boolean;
2240
+ _isLoading: boolean;
2241
+ get gridSize(): number;
2242
+ set gridSize(value: number);
2243
+ get stateManager(): BABYLON.NodeEditor.SharedUIComponents.StateManager;
2244
+ get nodes(): BABYLON.NodeEditor.SharedUIComponents.GraphNode[];
2245
+ get links(): BABYLON.NodeEditor.SharedUIComponents.NodeLink[];
2246
+ get frames(): BABYLON.NodeEditor.SharedUIComponents.GraphFrame[];
2247
+ get zoom(): number;
2248
+ set zoom(value: number);
2249
+ get x(): number;
2250
+ set x(value: number);
2251
+ get y(): number;
2252
+ set y(value: number);
2253
+ get selectedNodes(): BABYLON.NodeEditor.SharedUIComponents.GraphNode[];
2254
+ get selectedLink(): BABYLON.Nullable<BABYLON.NodeEditor.SharedUIComponents.NodeLink>;
2255
+ get selectedFrames(): BABYLON.NodeEditor.SharedUIComponents.GraphFrame[];
2256
+ get selectedPort(): BABYLON.Nullable<BABYLON.NodeEditor.SharedUIComponents.NodePort>;
2257
+ get canvasContainer(): HTMLDivElement;
2258
+ get hostCanvas(): HTMLDivElement;
2259
+ get svgCanvas(): HTMLElement;
2260
+ get selectionContainer(): HTMLDivElement;
2261
+ get frameContainer(): HTMLDivElement;
2262
+ private _selectedFrameAndNodesConflict;
2263
+ constructor(props: IGraphCanvasComponentProps);
2264
+ getCachedData(): any[];
2265
+ removeDataFromCache(data: any): void;
2266
+ createNodeFromObject(nodeData: BABYLON.NodeEditor.SharedUIComponents.INodeData, onNodeCreated: (data: any) => void, recursion?: boolean): BABYLON.NodeEditor.SharedUIComponents.GraphNode;
2267
+ getGridPosition(position: number, useCeil?: boolean): number;
2268
+ getGridPositionCeil(position: number): number;
2269
+ updateTransform(): void;
2270
+ onKeyUp(): void;
2271
+ findNodeFromData(data: any): BABYLON.NodeEditor.SharedUIComponents.GraphNode;
2272
+ reset(): void;
2273
+ connectPorts(pointA: BABYLON.NodeEditor.SharedUIComponents.IPortData, pointB: BABYLON.NodeEditor.SharedUIComponents.IPortData): void;
2274
+ removeLink(link: BABYLON.NodeEditor.SharedUIComponents.NodeLink): void;
2275
+ appendNode(nodeData: BABYLON.NodeEditor.SharedUIComponents.INodeData): BABYLON.NodeEditor.SharedUIComponents.GraphNode;
2276
+ distributeGraph(): void;
2277
+ componentDidMount(): void;
2278
+ onMove(evt: React.PointerEvent): void;
2279
+ onDown(evt: React.PointerEvent<HTMLElement>): void;
2280
+ onUp(evt: React.PointerEvent): void;
2281
+ onWheel(evt: React.WheelEvent): void;
2282
+ zoomToFit(): void;
2283
+ processCandidatePort(): void;
2284
+ connectNodes(nodeA: BABYLON.NodeEditor.SharedUIComponents.GraphNode, pointA: BABYLON.NodeEditor.SharedUIComponents.IPortData, nodeB: BABYLON.NodeEditor.SharedUIComponents.GraphNode, pointB: BABYLON.NodeEditor.SharedUIComponents.IPortData): void;
2285
+ processEditorData(editorData: BABYLON.NodeEditor.SharedUIComponents.IEditorData): void;
2286
+ reOrganize(editorData?: BABYLON.Nullable<BABYLON.NodeEditor.SharedUIComponents.IEditorData>, isImportingAFrame?: boolean): void;
2287
+ addFrame(frameData: BABYLON.NodeEditor.SharedUIComponents.IFrameData): void;
2288
+ render(): JSX.Element;
2289
+ }
2290
+
2291
+
2292
+
2293
+ }
2294
+ declare module BABYLON.NodeEditor {
2295
+
2296
+ }
2297
+ declare module BABYLON.NodeEditor.SharedUIComponents {
2298
+ export enum FramePortPosition {
2299
+ Top = 0,
2300
+ Middle = 1,
2301
+ Bottom = 2
2302
+ }
2303
+ export class GraphFrame {
2304
+ private readonly _collapsedWidth;
2305
+ private static _FrameCounter;
2306
+ private static _FramePortCounter;
2307
+ private _name;
2308
+ private _color;
2309
+ private _x;
2310
+ private _y;
2311
+ private _gridAlignedX;
2312
+ private _gridAlignedY;
2313
+ private _width;
2314
+ private _height;
2315
+ element: HTMLDivElement;
2316
+ private _borderElement;
2317
+ private _headerElement;
2318
+ private _headerTextElement;
2319
+ private _headerCollapseElement;
2320
+ private _headerCloseElement;
2321
+ private _commentsElement;
2322
+ private _portContainer;
2323
+ private _outputPortContainer;
2324
+ private _inputPortContainer;
2325
+ private _nodes;
2326
+ private _ownerCanvas;
2327
+ private _mouseStartPointX;
2328
+ private _mouseStartPointY;
2329
+ private _onSelectionChangedObserver;
2330
+ private _onGraphNodeRemovalObserver;
2331
+ private _onExposePortOnFrameObserver;
2332
+ private _onNodeLinkDisposedObservers;
2333
+ private _isCollapsed;
2334
+ private _frameInPorts;
2335
+ private _frameOutPorts;
2336
+ private _controlledPorts;
2337
+ private _exposedInPorts;
2338
+ private _exposedOutPorts;
2339
+ private _id;
2340
+ private _comments;
2341
+ private _frameIsResizing;
2342
+ private _resizingDirection;
2343
+ private _minFrameHeight;
2344
+ private _minFrameWidth;
2345
+ private _mouseXLimit;
2346
+ onExpandStateChanged: BABYLON.Observable<GraphFrame>;
2347
+ private readonly _closeSVG;
2348
+ private readonly _expandSVG;
2349
+ private readonly _collapseSVG;
2350
+ get id(): number;
2351
+ get isCollapsed(): boolean;
2352
+ private _createInputPort;
2353
+ private _markFramePortPositions;
2354
+ private _createFramePorts;
2355
+ private _removePortFromExposedWithNode;
2356
+ private _removePortFromExposedWithLink;
2357
+ private _createInputPorts;
2358
+ private _createOutputPorts;
2359
+ redrawFramePorts(): void;
2360
+ set isCollapsed(value: boolean);
2361
+ get nodes(): BABYLON.NodeEditor.SharedUIComponents.GraphNode[];
2362
+ get ports(): BABYLON.NodeEditor.SharedUIComponents.FrameNodePort[];
2363
+ get name(): string;
2364
+ set name(value: string);
2365
+ get color(): BABYLON.Color3;
2366
+ set color(value: BABYLON.Color3);
2367
+ get x(): number;
2368
+ set x(value: number);
2369
+ get y(): number;
2370
+ set y(value: number);
2371
+ get width(): number;
2372
+ set width(value: number);
2373
+ get height(): number;
2374
+ set height(value: number);
2375
+ get comments(): string;
2376
+ set comments(comments: string);
2377
+ constructor(candidate: BABYLON.Nullable<HTMLDivElement>, canvas: BABYLON.NodeEditor.SharedUIComponents.GraphCanvasComponent, doNotCaptureNodes?: boolean);
2378
+ refresh(): void;
2379
+ addNode(node: BABYLON.NodeEditor.SharedUIComponents.GraphNode): void;
2380
+ removeNode(node: BABYLON.NodeEditor.SharedUIComponents.GraphNode): void;
2381
+ syncNode(node: BABYLON.NodeEditor.SharedUIComponents.GraphNode): void;
2382
+ cleanAccumulation(): void;
2383
+ private _onDown;
2384
+ move(newX: number, newY: number, align?: boolean): void;
2385
+ private _onUp;
2386
+ _moveFrame(offsetX: number, offsetY: number): void;
2387
+ private _onMove;
2388
+ moveFramePortUp(nodePort: BABYLON.NodeEditor.SharedUIComponents.FrameNodePort): void;
2389
+ private _movePortUp;
2390
+ moveFramePortDown(nodePort: BABYLON.NodeEditor.SharedUIComponents.FrameNodePort): void;
2391
+ private _movePortDown;
2392
+ private _initResizing;
2393
+ private _cleanUpResizing;
2394
+ private _updateMinHeightWithComments;
2395
+ private _isResizingTop;
2396
+ private _isResizingRight;
2397
+ private _isResizingBottom;
2398
+ private _isResizingLeft;
2399
+ private _onRightHandlePointerDown;
2400
+ private _onRightHandlePointerMove;
2401
+ private _moveRightHandle;
2402
+ private _onRightHandlePointerUp;
2403
+ private _onBottomHandlePointerDown;
2404
+ private _onBottomHandlePointerMove;
2405
+ private _moveBottomHandle;
2406
+ private _onBottomHandlePointerUp;
2407
+ private _onLeftHandlePointerDown;
2408
+ private _onLeftHandlePointerMove;
2409
+ private _moveLeftHandle;
2410
+ private _onLeftHandlePointerUp;
2411
+ private _onTopHandlePointerDown;
2412
+ private _onTopHandlePointerMove;
2413
+ private _moveTopHandle;
2414
+ private _onTopHandlePointerUp;
2415
+ private _onTopRightHandlePointerDown;
2416
+ private _onTopRightHandlePointerMove;
2417
+ private _moveTopRightHandle;
2418
+ private _onTopRightHandlePointerUp;
2419
+ private _onBottomRightHandlePointerDown;
2420
+ private _onBottomRightHandlePointerMove;
2421
+ private _moveBottomRightHandle;
2422
+ private _onBottomRightHandlePointerUp;
2423
+ private _onBottomLeftHandlePointerDown;
2424
+ private _onBottomLeftHandlePointerMove;
2425
+ private _moveBottomLeftHandle;
2426
+ private _onBottomLeftHandlePointerUp;
2427
+ private _onTopLeftHandlePointerDown;
2428
+ private _onTopLeftHandlePointerMove;
2429
+ private _moveTopLeftHandle;
2430
+ private _onTopLeftHandlePointerUp;
2431
+ private _expandLeft;
2432
+ private _expandTop;
2433
+ private _expandRight;
2434
+ private _expandBottom;
2435
+ dispose(): void;
2436
+ private _serializePortData;
2437
+ serialize(saveCollapsedState: boolean): BABYLON.NodeEditor.SharedUIComponents.IFrameData;
2438
+ export(): void;
2439
+ adjustPorts(): void;
2440
+ static Parse(serializationData: BABYLON.NodeEditor.SharedUIComponents.IFrameData, canvas: BABYLON.NodeEditor.SharedUIComponents.GraphCanvasComponent, map?: {
2441
+ [key: number]: number;
2442
+ }): GraphFrame;
2443
+ }
2444
+
2445
+
2446
+
2447
+ }
2448
+ declare module BABYLON.NodeEditor {
2449
+
2450
+ }
2451
+ declare module BABYLON.NodeEditor.SharedUIComponents {
2452
+ /// <reference types="react" />
2453
+ export class GraphNode {
2454
+ content: BABYLON.NodeEditor.SharedUIComponents.INodeData;
2455
+ private _visual;
2456
+ private _headerContainer;
2457
+ private _warning;
2458
+ private _header;
2459
+ private _connections;
2460
+ private _inputsContainer;
2461
+ private _outputsContainer;
2462
+ private _content;
2463
+ private _comments;
2464
+ private _inputPorts;
2465
+ private _outputPorts;
2466
+ private _links;
2467
+ private _x;
2468
+ private _y;
2469
+ private _gridAlignedX;
2470
+ private _gridAlignedY;
2471
+ private _mouseStartPointX;
2472
+ private _mouseStartPointY;
2473
+ private _stateManager;
2474
+ private _onSelectionChangedObserver;
2475
+ private _onSelectionBoxMovedObserver;
2476
+ private _onFrameCreatedObserver;
2477
+ private _onUpdateRequiredObserver;
2478
+ private _ownerCanvas;
2479
+ private _isSelected;
2480
+ private _displayManager;
2481
+ private _isVisible;
2482
+ private _enclosingFrameId;
2483
+ get isVisible(): boolean;
2484
+ set isVisible(value: boolean);
2485
+ private _upateNodePortNames;
2486
+ get outputPorts(): BABYLON.NodeEditor.SharedUIComponents.NodePort[];
2487
+ get inputPorts(): BABYLON.NodeEditor.SharedUIComponents.NodePort[];
2488
+ get links(): BABYLON.NodeEditor.SharedUIComponents.NodeLink[];
2489
+ get gridAlignedX(): number;
2490
+ get gridAlignedY(): number;
2491
+ get x(): number;
2492
+ set x(value: number);
2493
+ get y(): number;
2494
+ set y(value: number);
2495
+ get width(): number;
2496
+ get height(): number;
2497
+ get id(): number;
2498
+ get name(): string;
2499
+ get isSelected(): boolean;
2500
+ get enclosingFrameId(): number;
2501
+ set enclosingFrameId(value: number);
2502
+ set isSelected(value: boolean);
2503
+ setIsSelected(value: boolean, marqueeSelection: boolean): void;
2504
+ constructor(content: BABYLON.NodeEditor.SharedUIComponents.INodeData, stateManager: BABYLON.NodeEditor.SharedUIComponents.StateManager);
2505
+ isOverlappingFrame(frame: BABYLON.NodeEditor.SharedUIComponents.GraphFrame): boolean;
2506
+ getPortForPortData(portData: BABYLON.NodeEditor.SharedUIComponents.IPortData): BABYLON.NodeEditor.SharedUIComponents.NodePort | null;
2507
+ getPortDataForPortDataContent(data: any): BABYLON.NodeEditor.SharedUIComponents.IPortData | null;
2508
+ getLinksForPortDataContent(data: any): BABYLON.NodeEditor.SharedUIComponents.NodeLink[];
2509
+ getLinksForPortData(portData: BABYLON.NodeEditor.SharedUIComponents.IPortData): BABYLON.NodeEditor.SharedUIComponents.NodeLink[];
2510
+ private _refreshFrames;
2511
+ _refreshLinks(): void;
2512
+ refresh(): void;
2513
+ private _onDown;
2514
+ cleanAccumulation(useCeil?: boolean): void;
2515
+ private _onUp;
2516
+ private _onMove;
2517
+ renderProperties(): BABYLON.Nullable<JSX.Element>;
2518
+ appendVisual(root: HTMLDivElement, owner: BABYLON.NodeEditor.SharedUIComponents.GraphCanvasComponent): void;
2519
+ dispose(): void;
2520
+ }
2521
+
2522
+
2523
+
2524
+ }
2525
+ declare module BABYLON.NodeEditor {
2526
+
2527
+ }
2528
+ declare module BABYLON.NodeEditor.SharedUIComponents {
2529
+ export interface IDisplayManager {
2530
+ getHeaderClass(data: BABYLON.NodeEditor.SharedUIComponents.INodeData): string;
2531
+ shouldDisplayPortLabels(data: BABYLON.NodeEditor.SharedUIComponents.IPortData): boolean;
2532
+ updatePreviewContent(data: BABYLON.NodeEditor.SharedUIComponents.INodeData, contentArea: HTMLDivElement): void;
2533
+ getBackgroundColor(data: BABYLON.NodeEditor.SharedUIComponents.INodeData): string;
2534
+ getHeaderText(data: BABYLON.NodeEditor.SharedUIComponents.INodeData): string;
2535
+ }
2536
+
2537
+
2538
+
2539
+ }
2540
+ declare module BABYLON.NodeEditor {
2541
+
2542
+ }
2543
+ declare module BABYLON.NodeEditor.SharedUIComponents {
2544
+ export interface INodeContainer {
2545
+ nodes: BABYLON.NodeEditor.SharedUIComponents.GraphNode[];
2546
+ appendNode(data: BABYLON.NodeEditor.SharedUIComponents.INodeData): BABYLON.NodeEditor.SharedUIComponents.GraphNode;
2547
+ }
2548
+
2549
+
2550
+
2551
+ }
2552
+ declare module BABYLON.NodeEditor {
2553
+
2554
+ }
2555
+ declare module BABYLON.NodeEditor.SharedUIComponents {
2556
+ export interface INodeData {
2557
+ data: any;
2558
+ name: string;
2559
+ uniqueId: number;
2560
+ isInput: boolean;
2561
+ comments: string;
2562
+ getWarningMessage: () => string;
2563
+ getClassName: () => string;
2564
+ dispose: () => void;
2565
+ getPortByName: (name: string) => BABYLON.Nullable<BABYLON.NodeEditor.SharedUIComponents.IPortData>;
2566
+ inputs: BABYLON.NodeEditor.SharedUIComponents.IPortData[];
2567
+ outputs: BABYLON.NodeEditor.SharedUIComponents.IPortData[];
2568
+ }
2569
+
2570
+
2571
+
2572
+ }
2573
+ declare module BABYLON.NodeEditor {
2574
+
2575
+ }
2576
+ declare module BABYLON.NodeEditor.SharedUIComponents {
2577
+ export interface INodeLocationInfo {
2578
+ blockId: number;
2579
+ x: number;
2580
+ y: number;
2581
+ }
2582
+ export interface IFrameData {
2583
+ x: number;
2584
+ y: number;
2585
+ width: number;
2586
+ height: number;
2587
+ color: number[];
2588
+ name: string;
2589
+ isCollapsed: boolean;
2590
+ blocks: number[];
2591
+ comments: string;
2592
+ }
2593
+ export interface IEditorData {
2594
+ locations: INodeLocationInfo[];
2595
+ x: number;
2596
+ y: number;
2597
+ zoom: number;
2598
+ frames?: IFrameData[];
2599
+ map?: {
2600
+ [key: number]: number;
2601
+ };
2602
+ }
2603
+
2604
+
2605
+
2606
+ }
2607
+ declare module BABYLON.NodeEditor {
2608
+
2609
+ }
2610
+ declare module BABYLON.NodeEditor.SharedUIComponents {
2611
+ export enum PortDataDirection {
2612
+ /** Input */
2613
+ Input = 0,
2614
+ /** Output */
2615
+ Output = 1
2616
+ }
2617
+ export interface IPortData {
2618
+ data: any;
2619
+ name: string;
2620
+ internalName: string;
2621
+ isExposedOnFrame: boolean;
2622
+ exposedPortPosition: number;
2623
+ isConnected: boolean;
2624
+ direction: PortDataDirection;
2625
+ ownerData: any;
2626
+ connectedPort: BABYLON.Nullable<IPortData>;
2627
+ needDualDirectionValidation: boolean;
2628
+ hasEndpoints: boolean;
2629
+ endpoints: BABYLON.Nullable<IPortData[]>;
2630
+ updateDisplayName: (newName: string) => void;
2631
+ connectTo: (port: IPortData) => void;
2632
+ disconnectFrom: (port: IPortData) => void;
2633
+ checkCompatibilityState(port: IPortData): number;
2634
+ getCompatibilityIssueMessage(issue: number, targetNode: BABYLON.NodeEditor.SharedUIComponents.GraphNode, targetPort: IPortData): string;
2635
+ }
2636
+
2637
+
2638
+
2639
+ }
2640
+ declare module BABYLON.NodeEditor {
2641
+
2642
+ }
2643
+ declare module BABYLON.NodeEditor.SharedUIComponents {
2644
+ export interface IPropertyComponentProps {
2645
+ stateManager: BABYLON.NodeEditor.SharedUIComponents.StateManager;
2646
+ nodeData: BABYLON.NodeEditor.SharedUIComponents.INodeData;
2647
+ }
2648
+
2649
+
2650
+
2651
+ }
2652
+ declare module BABYLON.NodeEditor {
2653
+
2654
+ }
2655
+ declare module BABYLON.NodeEditor.SharedUIComponents {
2656
+ export interface ISelectionChangedOptions {
2657
+ selection: BABYLON.Nullable<BABYLON.NodeEditor.SharedUIComponents.GraphNode | BABYLON.NodeEditor.SharedUIComponents.NodeLink | BABYLON.NodeEditor.SharedUIComponents.GraphFrame | BABYLON.NodeEditor.SharedUIComponents.NodePort | BABYLON.NodeEditor.SharedUIComponents.FramePortData>;
2658
+ forceKeepSelection?: boolean;
2659
+ marqueeSelection?: boolean;
2660
+ }
2661
+
2662
+
2663
+
2664
+ }
2665
+ declare module BABYLON.NodeEditor {
2666
+
2667
+ }
2668
+ declare module BABYLON.NodeEditor.SharedUIComponents {
2669
+ export class NodeLink {
2670
+ private _graphCanvas;
2671
+ private _portA;
2672
+ private _portB?;
2673
+ private _nodeA;
2674
+ private _nodeB?;
2675
+ private _path;
2676
+ private _selectionPath;
2677
+ private _onSelectionChangedObserver;
2678
+ private _isVisible;
2679
+ onDisposedObservable: BABYLON.Observable<NodeLink>;
2680
+ get isVisible(): boolean;
2681
+ set isVisible(value: boolean);
2682
+ get portA(): BABYLON.NodeEditor.SharedUIComponents.FrameNodePort | BABYLON.NodeEditor.SharedUIComponents.NodePort;
2683
+ get portB(): BABYLON.NodeEditor.SharedUIComponents.FrameNodePort | BABYLON.NodeEditor.SharedUIComponents.NodePort | undefined;
2684
+ get nodeA(): BABYLON.NodeEditor.SharedUIComponents.GraphNode;
2685
+ get nodeB(): BABYLON.NodeEditor.SharedUIComponents.GraphNode | undefined;
2686
+ update(endX?: number, endY?: number, straight?: boolean): void;
2687
+ constructor(graphCanvas: BABYLON.NodeEditor.SharedUIComponents.GraphCanvasComponent, portA: BABYLON.NodeEditor.SharedUIComponents.NodePort, nodeA: BABYLON.NodeEditor.SharedUIComponents.GraphNode, portB?: BABYLON.NodeEditor.SharedUIComponents.NodePort, nodeB?: BABYLON.NodeEditor.SharedUIComponents.GraphNode);
2688
+ onClick(evt: MouseEvent): void;
2689
+ dispose(notify?: boolean): void;
2690
+ }
2691
+
2692
+
2693
+
2694
+ }
2695
+ declare module BABYLON.NodeEditor {
2696
+
2697
+ }
2698
+ declare module BABYLON.NodeEditor.SharedUIComponents {
2699
+ export class NodePort {
2700
+ portData: BABYLON.NodeEditor.SharedUIComponents.IPortData;
2701
+ node: BABYLON.NodeEditor.SharedUIComponents.GraphNode;
2702
+ protected _element: HTMLDivElement;
2703
+ protected _img: HTMLImageElement;
2704
+ protected _stateManager: BABYLON.NodeEditor.SharedUIComponents.StateManager;
2705
+ protected _portLabelElement: Element;
2706
+ protected _onCandidateLinkMovedObserver: BABYLON.Nullable<BABYLON.Observer<BABYLON.Nullable<BABYLON.Vector2>>>;
2707
+ protected _onSelectionChangedObserver: BABYLON.Nullable<BABYLON.Observer<BABYLON.Nullable<BABYLON.NodeEditor.SharedUIComponents.ISelectionChangedOptions>>>;
2708
+ protected _exposedOnFrame: boolean;
2709
+ delegatedPort: BABYLON.Nullable<BABYLON.NodeEditor.SharedUIComponents.FrameNodePort>;
2710
+ get element(): HTMLDivElement;
2711
+ get portName(): string;
2712
+ set portName(newName: string);
2713
+ get disabled(): boolean;
2714
+ hasLabel(): boolean;
2715
+ get exposedOnFrame(): boolean;
2716
+ set exposedOnFrame(value: boolean);
2717
+ get exposedPortPosition(): number;
2718
+ set exposedPortPosition(value: number);
2719
+ private _isConnectedToNodeOutsideOfFrame;
2720
+ refresh(): void;
2721
+ constructor(portContainer: HTMLElement, portData: BABYLON.NodeEditor.SharedUIComponents.IPortData, node: BABYLON.NodeEditor.SharedUIComponents.GraphNode, stateManager: BABYLON.NodeEditor.SharedUIComponents.StateManager);
2722
+ dispose(): void;
2723
+ static CreatePortElement(portData: BABYLON.NodeEditor.SharedUIComponents.IPortData, node: BABYLON.NodeEditor.SharedUIComponents.GraphNode, root: HTMLElement, displayManager: BABYLON.Nullable<BABYLON.NodeEditor.SharedUIComponents.IDisplayManager>, stateManager: BABYLON.NodeEditor.SharedUIComponents.StateManager): NodePort;
2724
+ }
2725
+
2726
+
2727
+
2728
+ }
2729
+ declare module BABYLON.NodeEditor {
2730
+
2731
+ }
2732
+ declare module BABYLON.NodeEditor.SharedUIComponents {
2733
+ export class PropertyLedger {
2734
+ static DefaultControl: React.ComponentClass<BABYLON.NodeEditor.SharedUIComponents.IPropertyComponentProps>;
2735
+ static RegisteredControls: {
2736
+ [key: string]: React.ComponentClass<BABYLON.NodeEditor.SharedUIComponents.IPropertyComponentProps>;
2737
+ };
2738
+ }
2739
+
2740
+
2741
+
2742
+ }
2743
+ declare module BABYLON.NodeEditor {
2744
+
2745
+ }
2746
+ declare module BABYLON.NodeEditor.SharedUIComponents {
2747
+ export class StateManager {
2748
+ data: any;
2749
+ hostDocument: Document;
2750
+ lockObject: any;
2751
+ onSelectionChangedObservable: BABYLON.Observable<BABYLON.Nullable<BABYLON.NodeEditor.SharedUIComponents.ISelectionChangedOptions>>;
2752
+ onFrameCreatedObservable: BABYLON.Observable<BABYLON.NodeEditor.SharedUIComponents.GraphFrame>;
2753
+ onUpdateRequiredObservable: BABYLON.Observable<any>;
2754
+ onGraphNodeRemovalObservable: BABYLON.Observable<BABYLON.NodeEditor.SharedUIComponents.GraphNode>;
2755
+ onSelectionBoxMoved: BABYLON.Observable<ClientRect | DOMRect>;
2756
+ onCandidateLinkMoved: BABYLON.Observable<BABYLON.Nullable<BABYLON.Vector2>>;
2757
+ onCandidatePortSelectedObservable: BABYLON.Observable<BABYLON.Nullable<BABYLON.NodeEditor.SharedUIComponents.FrameNodePort | BABYLON.NodeEditor.SharedUIComponents.NodePort>>;
2758
+ onNewNodeCreatedObservable: BABYLON.Observable<BABYLON.NodeEditor.SharedUIComponents.GraphNode>;
2759
+ onRebuildRequiredObservable: BABYLON.Observable<boolean>;
2760
+ onErrorMessageDialogRequiredObservable: BABYLON.Observable<string>;
2761
+ onExposePortOnFrameObservable: BABYLON.Observable<BABYLON.NodeEditor.SharedUIComponents.GraphNode>;
2762
+ onGridSizeChanged: BABYLON.Observable<void>;
2763
+ onNewBlockRequiredObservable: BABYLON.Observable<{
2764
+ type: string;
2765
+ targetX: number;
2766
+ targetY: number;
2767
+ needRepositioning?: boolean | undefined;
2768
+ }>;
2769
+ exportData: (data: any) => string;
2770
+ isElbowConnectionAllowed: (nodeA: BABYLON.NodeEditor.SharedUIComponents.FrameNodePort | BABYLON.NodeEditor.SharedUIComponents.NodePort, nodeB: BABYLON.NodeEditor.SharedUIComponents.FrameNodePort | BABYLON.NodeEditor.SharedUIComponents.NodePort) => boolean;
2771
+ applyNodePortDesign: (data: BABYLON.NodeEditor.SharedUIComponents.IPortData, element: HTMLElement, img: HTMLImageElement) => void;
2772
+ storeEditorData: (serializationObject: any, frame?: BABYLON.Nullable<BABYLON.NodeEditor.SharedUIComponents.GraphFrame>) => void;
2773
+ getEditorDataMap: () => {
2774
+ [key: number]: number;
2775
+ };
2776
+ createDefaultInputData: (rootData: any, portData: BABYLON.NodeEditor.SharedUIComponents.IPortData, nodeContainer: BABYLON.NodeEditor.SharedUIComponents.INodeContainer) => {
2777
+ data: BABYLON.NodeEditor.SharedUIComponents.INodeData;
2778
+ name: string;
2779
+ };
2780
+ }
2781
+
2782
+
2783
+
2784
+ }
2785
+ declare module BABYLON.NodeEditor {
2786
+
2787
+ }
2788
+ declare module BABYLON.NodeEditor.SharedUIComponents {
2789
+ export const IsFramePortData: (variableToCheck: any) => variableToCheck is BABYLON.NodeEditor.SharedUIComponents.FramePortData;
2790
+ export const RefreshNode: (node: BABYLON.NodeEditor.SharedUIComponents.GraphNode, visitedNodes?: Set<BABYLON.NodeEditor.SharedUIComponents.GraphNode> | undefined, visitedLinks?: Set<BABYLON.NodeEditor.SharedUIComponents.NodeLink> | undefined) => void;
2791
+
2792
+
2793
+
2794
+ }
2795
+ declare module BABYLON.NodeEditor {
2796
+
2797
+ }
2798
+ declare module BABYLON.NodeEditor.SharedUIComponents {
2799
+ export class TypeLedger {
2800
+ static PortDataBuilder: (port: BABYLON.NodeEditor.SharedUIComponents.NodePort, nodeContainer: BABYLON.NodeEditor.SharedUIComponents.INodeContainer) => BABYLON.NodeEditor.SharedUIComponents.IPortData;
2801
+ static NodeDataBuilder: (data: any, nodeContainer: BABYLON.NodeEditor.SharedUIComponents.INodeContainer) => BABYLON.NodeEditor.SharedUIComponents.INodeData;
2802
+ }
2803
+
2804
+
2805
+
2806
+ }
2807
+ declare module BABYLON.NodeEditor {
2808
+
2809
+ }
2810
+ declare module BABYLON.NodeEditor.SharedUIComponents {
2811
+ export type FramePortData = {
2812
+ frame: BABYLON.NodeEditor.SharedUIComponents.GraphFrame;
2813
+ port: FrameNodePort;
2814
+ };
2815
+
2816
+
2817
+
2749
2818
  }
2750
2819
  declare module BABYLON.NodeEditor {
2751
2820