babylonjs-node-editor 5.0.0-rc.9 → 5.0.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.
@@ -0,0 +1,2678 @@
1
+
2
+ declare module BABYLON.NodeEditor {
3
+ export class BlockTools {
4
+ static GetBlockFromString(data: string, scene: BABYLON.Scene, nodeMaterial: BABYLON.NodeMaterial): BABYLON.ElbowBlock | BABYLON.TwirlBlock | BABYLON.VoronoiNoiseBlock | BABYLON.ScreenSpaceBlock | BABYLON.CloudBlock | BABYLON.MatrixBuilderBlock | BABYLON.DesaturateBlock | BABYLON.RefractBlock | BABYLON.ReflectBlock | BABYLON.DerivativeBlock | BABYLON.Rotate2dBlock | BABYLON.NormalBlendBlock | BABYLON.WorleyNoise3DBlock | BABYLON.SimplexPerlin3DBlock | BABYLON.BonesBlock | BABYLON.InstancesBlock | BABYLON.MorphTargetsBlock | BABYLON.DiscardBlock | BABYLON.ImageProcessingBlock | BABYLON.ColorMergerBlock | BABYLON.VectorMergerBlock | BABYLON.ColorSplitterBlock | BABYLON.VectorSplitterBlock | BABYLON.TextureBlock | BABYLON.ReflectionTextureBlock | BABYLON.LightBlock | BABYLON.FogBlock | BABYLON.VertexOutputBlock | BABYLON.FragmentOutputBlock | BABYLON.AddBlock | BABYLON.ClampBlock | BABYLON.ScaleBlock | BABYLON.CrossBlock | BABYLON.DotBlock | BABYLON.PowBlock | BABYLON.MultiplyBlock | BABYLON.TransformBlock | BABYLON.TrigonometryBlock | BABYLON.RemapBlock | BABYLON.NormalizeBlock | BABYLON.FresnelBlock | BABYLON.LerpBlock | BABYLON.NLerpBlock | BABYLON.DivideBlock | BABYLON.SubtractBlock | BABYLON.ModBlock | BABYLON.StepBlock | BABYLON.SmoothStepBlock | BABYLON.OneMinusBlock | BABYLON.ReciprocalBlock | BABYLON.ViewDirectionBlock | BABYLON.LightInformationBlock | BABYLON.MaxBlock | BABYLON.MinBlock | BABYLON.LengthBlock | BABYLON.DistanceBlock | BABYLON.NegateBlock | BABYLON.PerturbNormalBlock | BABYLON.RandomNumberBlock | BABYLON.ReplaceColorBlock | BABYLON.PosterizeBlock | BABYLON.ArcTan2Block | BABYLON.GradientBlock | BABYLON.FrontFacingBlock | BABYLON.WaveBlock | BABYLON.InputBlock | BABYLON.PBRMetallicRoughnessBlock | BABYLON.SheenBlock | BABYLON.AnisotropyBlock | BABYLON.ReflectionBlock | BABYLON.ClearCoatBlock | BABYLON.RefractionBlock | BABYLON.SubSurfaceBlock | BABYLON.CurrentScreenBlock | BABYLON.ParticleTextureBlock | BABYLON.ParticleRampGradientBlock | BABYLON.ParticleBlendMultiplyBlock | BABYLON.FragCoordBlock | BABYLON.ScreenSizeBlock | BABYLON.SceneDepthBlock | BABYLON.ConditionalBlock | BABYLON.ImageSourceBlock | BABYLON.ClipPlanesBlock | null;
5
+ static GetColorFromConnectionNodeType(type: BABYLON.NodeMaterialBlockConnectionPointTypes): string;
6
+ static GetConnectionNodeTypeFromString(type: string): BABYLON.NodeMaterialBlockConnectionPointTypes.Float | BABYLON.NodeMaterialBlockConnectionPointTypes.Vector2 | BABYLON.NodeMaterialBlockConnectionPointTypes.Vector3 | BABYLON.NodeMaterialBlockConnectionPointTypes.Vector4 | BABYLON.NodeMaterialBlockConnectionPointTypes.Color3 | BABYLON.NodeMaterialBlockConnectionPointTypes.Color4 | BABYLON.NodeMaterialBlockConnectionPointTypes.Matrix | BABYLON.NodeMaterialBlockConnectionPointTypes.AutoDetect;
7
+ static GetStringFromConnectionNodeType(type: BABYLON.NodeMaterialBlockConnectionPointTypes): "" | "Float" | "Vector2" | "Vector3" | "Vector4" | "Matrix" | "Color3" | "Color4";
8
+ }
9
+
10
+
11
+ interface ILogComponentProps {
12
+ globalState: GlobalState;
13
+ }
14
+ export class LogEntry {
15
+ message: string;
16
+ isError: boolean;
17
+ time: Date;
18
+ constructor(message: string, isError: boolean);
19
+ }
20
+ export class LogComponent extends React.Component<ILogComponentProps, {
21
+ logs: LogEntry[];
22
+ }> {
23
+ constructor(props: ILogComponentProps);
24
+ componentDidMount(): void;
25
+ componentDidUpdate(): void;
26
+ render(): JSX.Element;
27
+ }
28
+
29
+
30
+ interface INodeListComponentProps {
31
+ globalState: GlobalState;
32
+ }
33
+ export class NodeListComponent extends React.Component<INodeListComponentProps, {
34
+ filter: string;
35
+ }> {
36
+ private _onResetRequiredObserver;
37
+ private static _Tooltips;
38
+ private _customFrameList;
39
+ private _customBlockList;
40
+ constructor(props: INodeListComponentProps);
41
+ componentWillUnmount(): void;
42
+ filterContent(filter: string): void;
43
+ loadCustomFrame(file: File): void;
44
+ removeItem(value: string): void;
45
+ loadCustomBlock(file: File): void;
46
+ removeCustomBlock(value: string): void;
47
+ render(): JSX.Element;
48
+ }
49
+
50
+
51
+ interface IPreviewAreaComponentProps {
52
+ globalState: GlobalState;
53
+ width: number;
54
+ }
55
+ export class PreviewAreaComponent extends React.Component<IPreviewAreaComponentProps, {
56
+ isLoading: boolean;
57
+ }> {
58
+ private _onIsLoadingChangedObserver;
59
+ private _onResetRequiredObserver;
60
+ constructor(props: IPreviewAreaComponentProps);
61
+ componentWillUnmount(): void;
62
+ changeBackFaceCulling(value: boolean): void;
63
+ changeDepthPrePass(value: boolean): void;
64
+ changeParticleSystemBlendMode(newOne: number): void;
65
+ render(): JSX.Element;
66
+ }
67
+
68
+
69
+ export class PreviewManager {
70
+ private _nodeMaterial;
71
+ private _onBuildObserver;
72
+ private _onPreviewCommandActivatedObserver;
73
+ private _onAnimationCommandActivatedObserver;
74
+ private _onUpdateRequiredObserver;
75
+ private _onPreviewBackgroundChangedObserver;
76
+ private _onBackFaceCullingChangedObserver;
77
+ private _onDepthPrePassChangedObserver;
78
+ private _onLightUpdatedObserver;
79
+ private _engine;
80
+ private _scene;
81
+ private _meshes;
82
+ private _camera;
83
+ private _material;
84
+ private _globalState;
85
+ private _currentType;
86
+ private _lightParent;
87
+ private _postprocess;
88
+ private _proceduralTexture;
89
+ private _particleSystem;
90
+ private _layer;
91
+ constructor(targetCanvas: HTMLCanvasElement, globalState: GlobalState);
92
+ private _handleAnimations;
93
+ private _prepareLights;
94
+ private _prepareScene;
95
+ private _refreshPreviewMesh;
96
+ private _loadParticleSystem;
97
+ private _forceCompilationAsync;
98
+ private _updatePreview;
99
+ dispose(): void;
100
+ }
101
+
102
+
103
+ interface IPreviewMeshControlComponent {
104
+ globalState: GlobalState;
105
+ togglePreviewAreaComponent: () => void;
106
+ }
107
+ export class PreviewMeshControlComponent extends React.Component<IPreviewMeshControlComponent> {
108
+ private _colorInputRef;
109
+ private _filePickerRef;
110
+ private _onResetRequiredObserver;
111
+ constructor(props: IPreviewMeshControlComponent);
112
+ componentWillUnmount(): void;
113
+ changeMeshType(newOne: PreviewType): void;
114
+ useCustomMesh(evt: any): void;
115
+ onPopUp(): void;
116
+ changeAnimation(): void;
117
+ changeBackground(value: string): void;
118
+ changeBackgroundClick(): void;
119
+ render(): JSX.Element;
120
+ }
121
+
122
+
123
+ export enum PreviewType {
124
+ Sphere = 0,
125
+ Box = 1,
126
+ Torus = 2,
127
+ Cylinder = 3,
128
+ Plane = 4,
129
+ ShaderBall = 5,
130
+ DefaultParticleSystem = 6,
131
+ Bubbles = 7,
132
+ Smoke = 8,
133
+ Rain = 9,
134
+ Explosion = 10,
135
+ Fire = 11,
136
+ Custom = 12
137
+ }
138
+
139
+
140
+ interface IInputsPropertyTabComponentProps {
141
+ globalState: GlobalState;
142
+ inputs: BABYLON.InputBlock[];
143
+ }
144
+ export class InputsPropertyTabComponent extends React.Component<IInputsPropertyTabComponentProps> {
145
+ constructor(props: IInputsPropertyTabComponentProps);
146
+ processInputBlockUpdate(ib: BABYLON.InputBlock): void;
147
+ renderInputBlock(block: BABYLON.InputBlock): JSX.Element | null;
148
+ render(): JSX.Element;
149
+ }
150
+
151
+
152
+ interface IColor3PropertyTabComponentProps {
153
+ globalState: GlobalState;
154
+ inputBlock: BABYLON.InputBlock;
155
+ }
156
+ export class Color3PropertyTabComponent extends React.Component<IColor3PropertyTabComponentProps> {
157
+ render(): JSX.Element;
158
+ }
159
+
160
+
161
+ interface IColor4PropertyTabComponentProps {
162
+ globalState: GlobalState;
163
+ inputBlock: BABYLON.InputBlock;
164
+ }
165
+ export class Color4PropertyTabComponent extends React.Component<IColor4PropertyTabComponentProps> {
166
+ render(): JSX.Element;
167
+ }
168
+
169
+
170
+ interface IFloatPropertyTabComponentProps {
171
+ globalState: GlobalState;
172
+ inputBlock: BABYLON.InputBlock;
173
+ }
174
+ export class FloatPropertyTabComponent extends React.Component<IFloatPropertyTabComponentProps> {
175
+ render(): JSX.Element;
176
+ }
177
+
178
+
179
+ interface IMatrixPropertyTabComponentProps {
180
+ globalState: GlobalState;
181
+ inputBlock: BABYLON.InputBlock;
182
+ }
183
+ export class MatrixPropertyTabComponent extends React.Component<IMatrixPropertyTabComponentProps> {
184
+ render(): JSX.Element;
185
+ }
186
+
187
+
188
+ interface IVector2PropertyTabComponentProps {
189
+ globalState: GlobalState;
190
+ inputBlock: BABYLON.InputBlock;
191
+ }
192
+ export class Vector2PropertyTabComponent extends React.Component<IVector2PropertyTabComponentProps> {
193
+ render(): JSX.Element;
194
+ }
195
+
196
+
197
+ interface IVector3PropertyTabComponentProps {
198
+ globalState: GlobalState;
199
+ inputBlock: BABYLON.InputBlock;
200
+ }
201
+ export class Vector3PropertyTabComponent extends React.Component<IVector3PropertyTabComponentProps> {
202
+ render(): JSX.Element;
203
+ }
204
+
205
+
206
+ interface IVector4PropertyTabComponentProps {
207
+ globalState: GlobalState;
208
+ inputBlock: BABYLON.InputBlock;
209
+ }
210
+ export class Vector4PropertyTabComponent extends React.Component<IVector4PropertyTabComponentProps> {
211
+ render(): JSX.Element;
212
+ }
213
+
214
+
215
+ interface IPropertyTabComponentProps {
216
+ globalState: GlobalState;
217
+ }
218
+ interface IPropertyTabComponentState {
219
+ currentNode: BABYLON.Nullable<GraphNode>;
220
+ currentFrame: BABYLON.Nullable<GraphFrame>;
221
+ currentFrameNodePort: BABYLON.Nullable<FrameNodePort>;
222
+ currentNodePort: BABYLON.Nullable<NodePort>;
223
+ uploadInProgress: boolean;
224
+ }
225
+ export class PropertyTabComponent extends React.Component<IPropertyTabComponentProps, IPropertyTabComponentState> {
226
+ private _onBuiltObserver;
227
+ private _modeSelect;
228
+ constructor(props: IPropertyTabComponentProps);
229
+ componentDidMount(): void;
230
+ componentWillUnmount(): void;
231
+ processInputBlockUpdate(ib: BABYLON.InputBlock): void;
232
+ renderInputBlock(block: BABYLON.InputBlock): JSX.Element | null;
233
+ load(file: File): void;
234
+ loadFrame(file: File): void;
235
+ save(): void;
236
+ customSave(): void;
237
+ saveToSnippetServer(): void;
238
+ loadFromSnippet(): void;
239
+ changeMode(value: any, force?: boolean, loadDefault?: boolean): boolean;
240
+ render(): JSX.Element;
241
+ }
242
+
243
+
244
+ export class ClampDisplayManager implements IDisplayManager {
245
+ getHeaderClass(): string;
246
+ shouldDisplayPortLabels(): boolean;
247
+ getHeaderText(block: BABYLON.NodeMaterialBlock): string;
248
+ getBackgroundColor(): string;
249
+ updatePreviewContent(block: BABYLON.NodeMaterialBlock, contentArea: HTMLDivElement): void;
250
+ }
251
+
252
+
253
+ export class ConditionalDisplayManager implements IDisplayManager {
254
+ getHeaderClass(): string;
255
+ shouldDisplayPortLabels(): boolean;
256
+ getHeaderText(block: BABYLON.NodeMaterialBlock): string;
257
+ getBackgroundColor(): string;
258
+ updatePreviewContent(): void;
259
+ }
260
+
261
+
262
+ export class DiscardDisplayManager implements IDisplayManager {
263
+ getHeaderClass(): string;
264
+ shouldDisplayPortLabels(): boolean;
265
+ getHeaderText(block: BABYLON.NodeMaterialBlock): string;
266
+ 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;
277
+ }
278
+
279
+
280
+ export class ElbowDisplayManager implements IDisplayManager {
281
+ getHeaderClass(): string;
282
+ shouldDisplayPortLabels(): boolean;
283
+ getHeaderText(block: BABYLON.NodeMaterialBlock): string;
284
+ getBackgroundColor(block: BABYLON.NodeMaterialBlock): string;
285
+ updatePreviewContent(block: BABYLON.NodeMaterialBlock, contentArea: HTMLDivElement): void;
286
+ }
287
+
288
+
289
+ export class GradientDisplayManager implements IDisplayManager {
290
+ getHeaderClass(): string;
291
+ shouldDisplayPortLabels(): boolean;
292
+ getHeaderText(block: BABYLON.NodeMaterialBlock): string;
293
+ getBackgroundColor(block: BABYLON.NodeMaterialBlock): string;
294
+ updatePreviewContent(block: BABYLON.NodeMaterialBlock, contentArea: HTMLDivElement): void;
295
+ }
296
+
297
+
298
+ export class ImageSourceDisplayManager implements IDisplayManager {
299
+ private _previewCanvas;
300
+ private _previewImage;
301
+ getHeaderClass(): string;
302
+ shouldDisplayPortLabels(): boolean;
303
+ getHeaderText(block: BABYLON.NodeMaterialBlock): string;
304
+ getBackgroundColor(): string;
305
+ updatePreviewContent(block: BABYLON.NodeMaterialBlock, contentArea: HTMLDivElement): void;
306
+ }
307
+
308
+
309
+ export class InputDisplayManager implements IDisplayManager {
310
+ getHeaderClass(block: BABYLON.NodeMaterialBlock): "" | "constant" | "inspector";
311
+ shouldDisplayPortLabels(): boolean;
312
+ getHeaderText(block: BABYLON.NodeMaterialBlock): string;
313
+ static GetBaseType(type: BABYLON.NodeMaterialBlockConnectionPointTypes): string;
314
+ getBackgroundColor(block: BABYLON.NodeMaterialBlock): string;
315
+ updatePreviewContent(block: BABYLON.NodeMaterialBlock, contentArea: HTMLDivElement): void;
316
+ }
317
+
318
+
319
+ export class OutputDisplayManager implements IDisplayManager {
320
+ getHeaderClass(): string;
321
+ shouldDisplayPortLabels(): boolean;
322
+ getHeaderText(block: BABYLON.NodeMaterialBlock): string;
323
+ getBackgroundColor(): string;
324
+ updatePreviewContent(block: BABYLON.NodeMaterialBlock, contentArea: HTMLDivElement): void;
325
+ }
326
+
327
+
328
+ export class PBRDisplayManager implements IDisplayManager {
329
+ getHeaderClass(): string;
330
+ shouldDisplayPortLabels(): boolean;
331
+ getHeaderText(block: BABYLON.NodeMaterialBlock): string;
332
+ getBackgroundColor(): string;
333
+ updatePreviewContent(block: BABYLON.NodeMaterialBlock, contentArea: HTMLDivElement): void;
334
+ }
335
+
336
+
337
+ export class RemapDisplayManager implements IDisplayManager {
338
+ getHeaderClass(): string;
339
+ shouldDisplayPortLabels(): boolean;
340
+ getHeaderText(block: BABYLON.NodeMaterialBlock): string;
341
+ getBackgroundColor(): string;
342
+ private _extractInputValue;
343
+ updatePreviewContent(block: BABYLON.NodeMaterialBlock, contentArea: HTMLDivElement): void;
344
+ }
345
+
346
+
347
+ export class TextureDisplayManager implements IDisplayManager {
348
+ private _previewCanvas;
349
+ private _previewImage;
350
+ getHeaderClass(): string;
351
+ shouldDisplayPortLabels(): boolean;
352
+ getHeaderText(block: BABYLON.NodeMaterialBlock): string;
353
+ getBackgroundColor(block: BABYLON.NodeMaterialBlock): string;
354
+ updatePreviewContent(block: BABYLON.NodeMaterialBlock, contentArea: HTMLDivElement): void;
355
+ }
356
+
357
+
358
+ export class TrigonometryDisplayManager implements IDisplayManager {
359
+ getHeaderClass(): string;
360
+ shouldDisplayPortLabels(): boolean;
361
+ getHeaderText(block: BABYLON.NodeMaterialBlock): string;
362
+ getBackgroundColor(): string;
363
+ updatePreviewContent(block: BABYLON.NodeMaterialBlock, contentArea: HTMLDivElement): void;
364
+ }
365
+
366
+
367
+ export class DisplayLedger {
368
+ static RegisteredControls: {
369
+ [key: string]: any;
370
+ };
371
+ }
372
+
373
+
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;
390
+ }
391
+
392
+
393
+ export interface IGraphCanvasComponentProps {
394
+ globalState: GlobalState;
395
+ onEmitNewBlock: (block: BABYLON.NodeMaterialBlock) => GraphNode;
396
+ }
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 _ctrlKeyIsPressed;
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
+ constructor(props: IGraphCanvasComponentProps);
460
+ static _RefreshNode: (node: GraphNode, visitedNodes?: Set<GraphNode> | undefined, visitedLinks?: Set<NodeLink> | undefined) => void;
461
+ getGridPosition(position: number, useCeil?: boolean): number;
462
+ getGridPositionCeil(position: number): number;
463
+ updateTransform(): void;
464
+ onKeyUp(): void;
465
+ findNodeFromBlock(block: BABYLON.NodeMaterialBlock): GraphNode;
466
+ reset(): void;
467
+ connectPorts(pointA: BABYLON.NodeMaterialConnectionPoint, pointB: BABYLON.NodeMaterialConnectionPoint): void;
468
+ removeLink(link: NodeLink): void;
469
+ appendBlock(block: BABYLON.NodeMaterialBlock): GraphNode;
470
+ distributeGraph(): void;
471
+ componentDidMount(): void;
472
+ onMove(evt: React.PointerEvent): void;
473
+ onDown(evt: React.PointerEvent<HTMLElement>): void;
474
+ onUp(evt: React.PointerEvent): void;
475
+ onWheel(evt: React.WheelEvent): void;
476
+ zoomToFit(): void;
477
+ processCandidatePort(): void;
478
+ connectNodes(nodeA: GraphNode, pointA: BABYLON.NodeMaterialConnectionPoint, nodeB: GraphNode, pointB: BABYLON.NodeMaterialConnectionPoint): void;
479
+ processEditorData(editorData: IEditorData): void;
480
+ addFrame(frameData: IFrameData): void;
481
+ render(): JSX.Element;
482
+ }
483
+
484
+
485
+ export enum FramePortPosition {
486
+ Top = 0,
487
+ Middle = 1,
488
+ Bottom = 2
489
+ }
490
+ export class GraphFrame {
491
+ private readonly _collapsedWidth;
492
+ private static _FrameCounter;
493
+ private static _FramePortCounter;
494
+ private _name;
495
+ private _color;
496
+ private _x;
497
+ private _y;
498
+ private _gridAlignedX;
499
+ private _gridAlignedY;
500
+ private _width;
501
+ private _height;
502
+ element: HTMLDivElement;
503
+ private _borderElement;
504
+ private _headerElement;
505
+ private _headerTextElement;
506
+ private _headerCollapseElement;
507
+ private _headerCloseElement;
508
+ private _commentsElement;
509
+ private _portContainer;
510
+ private _outputPortContainer;
511
+ private _inputPortContainer;
512
+ private _nodes;
513
+ private _ownerCanvas;
514
+ private _mouseStartPointX;
515
+ private _mouseStartPointY;
516
+ private _onSelectionChangedObserver;
517
+ private _onGraphNodeRemovalObserver;
518
+ private _onExposePortOnFrameObserver;
519
+ private _onNodeLinkDisposedObservers;
520
+ private _isCollapsed;
521
+ private _frameInPorts;
522
+ private _frameOutPorts;
523
+ private _controlledPorts;
524
+ private _exposedInPorts;
525
+ private _exposedOutPorts;
526
+ private _id;
527
+ private _comments;
528
+ private _frameIsResizing;
529
+ private _resizingDirection;
530
+ private _minFrameHeight;
531
+ private _minFrameWidth;
532
+ private _mouseXLimit;
533
+ onExpandStateChanged: BABYLON.Observable<GraphFrame>;
534
+ private readonly _closeSVG;
535
+ private readonly _expandSVG;
536
+ private readonly _collapseSVG;
537
+ get id(): number;
538
+ get isCollapsed(): boolean;
539
+ private _createInputPort;
540
+ private _markFramePortPositions;
541
+ private _createFramePorts;
542
+ private _removePortFromExposedWithNode;
543
+ private _removePortFromExposedWithLink;
544
+ private _createInputPorts;
545
+ private _createOutputPorts;
546
+ redrawFramePorts(): void;
547
+ set isCollapsed(value: boolean);
548
+ get nodes(): GraphNode[];
549
+ get ports(): FrameNodePort[];
550
+ get name(): string;
551
+ set name(value: string);
552
+ get color(): BABYLON.Color3;
553
+ set color(value: BABYLON.Color3);
554
+ get x(): number;
555
+ set x(value: number);
556
+ get y(): number;
557
+ set y(value: number);
558
+ get width(): number;
559
+ set width(value: number);
560
+ get height(): number;
561
+ set height(value: number);
562
+ get comments(): string;
563
+ set comments(comments: string);
564
+ constructor(candidate: BABYLON.Nullable<HTMLDivElement>, canvas: GraphCanvasComponent, doNotCaptureNodes?: boolean);
565
+ refresh(): void;
566
+ addNode(node: GraphNode): void;
567
+ removeNode(node: GraphNode): void;
568
+ syncNode(node: GraphNode): void;
569
+ cleanAccumulation(): void;
570
+ private _onDown;
571
+ move(newX: number, newY: number, align?: boolean): void;
572
+ private _onUp;
573
+ _moveFrame(offsetX: number, offsetY: number): void;
574
+ private _onMove;
575
+ moveFramePortUp(nodePort: FrameNodePort): void;
576
+ private _movePortUp;
577
+ moveFramePortDown(nodePort: FrameNodePort): void;
578
+ private _movePortDown;
579
+ private _initResizing;
580
+ private _cleanUpResizing;
581
+ private _updateMinHeightWithComments;
582
+ private _isResizingTop;
583
+ private _isResizingRight;
584
+ private _isResizingBottom;
585
+ private _isResizingLeft;
586
+ private _onRightHandlePointerDown;
587
+ private _onRightHandlePointerMove;
588
+ private _moveRightHandle;
589
+ private _onRightHandlePointerUp;
590
+ private _onBottomHandlePointerDown;
591
+ private _onBottomHandlePointerMove;
592
+ private _moveBottomHandle;
593
+ private _onBottomHandlePointerUp;
594
+ private _onLeftHandlePointerDown;
595
+ private _onLeftHandlePointerMove;
596
+ private _moveLeftHandle;
597
+ private _onLeftHandlePointerUp;
598
+ private _onTopHandlePointerDown;
599
+ private _onTopHandlePointerMove;
600
+ private _moveTopHandle;
601
+ private _onTopHandlePointerUp;
602
+ private _onTopRightHandlePointerDown;
603
+ private _onTopRightHandlePointerMove;
604
+ private _moveTopRightHandle;
605
+ private _onTopRightHandlePointerUp;
606
+ private _onBottomRightHandlePointerDown;
607
+ private _onBottomRightHandlePointerMove;
608
+ private _moveBottomRightHandle;
609
+ private _onBottomRightHandlePointerUp;
610
+ private _onBottomLeftHandlePointerDown;
611
+ private _onBottomLeftHandlePointerMove;
612
+ private _moveBottomLeftHandle;
613
+ private _onBottomLeftHandlePointerUp;
614
+ private _onTopLeftHandlePointerDown;
615
+ private _onTopLeftHandlePointerMove;
616
+ private _moveTopLeftHandle;
617
+ private _onTopLeftHandlePointerUp;
618
+ private _expandLeft;
619
+ private _expandTop;
620
+ private _expandRight;
621
+ private _expandBottom;
622
+ dispose(): void;
623
+ private _serializePortData;
624
+ serialize(saveCollapsedState: boolean): IFrameData;
625
+ export(): void;
626
+ adjustPorts(): void;
627
+ static Parse(serializationData: IFrameData, canvas: GraphCanvasComponent, map?: {
628
+ [key: number]: number;
629
+ }): GraphFrame;
630
+ }
631
+
632
+
633
+ /// <reference types="react" />
634
+ export class GraphNode {
635
+ block: BABYLON.NodeMaterialBlock;
636
+ private _visual;
637
+ private _headerContainer;
638
+ private _promotionWarning;
639
+ private _header;
640
+ private _connections;
641
+ private _inputsContainer;
642
+ private _outputsContainer;
643
+ private _content;
644
+ private _comments;
645
+ private _inputPorts;
646
+ private _outputPorts;
647
+ private _links;
648
+ private _x;
649
+ private _y;
650
+ private _gridAlignedX;
651
+ private _gridAlignedY;
652
+ private _mouseStartPointX;
653
+ private _mouseStartPointY;
654
+ private _globalState;
655
+ private _onSelectionChangedObserver;
656
+ private _onSelectionBoxMovedObserver;
657
+ private _onFrameCreatedObserver;
658
+ private _onUpdateRequiredObserver;
659
+ private _ownerCanvas;
660
+ private _isSelected;
661
+ private _displayManager;
662
+ private _isVisible;
663
+ private _enclosingFrameId;
664
+ get isVisible(): boolean;
665
+ set isVisible(value: boolean);
666
+ private _upateNodePortNames;
667
+ get outputPorts(): NodePort[];
668
+ get inputPorts(): NodePort[];
669
+ get links(): NodeLink[];
670
+ get gridAlignedX(): number;
671
+ get gridAlignedY(): number;
672
+ get x(): number;
673
+ set x(value: number);
674
+ get y(): number;
675
+ set y(value: number);
676
+ get width(): number;
677
+ get height(): number;
678
+ get id(): number;
679
+ get name(): string;
680
+ get isSelected(): boolean;
681
+ get enclosingFrameId(): number;
682
+ set enclosingFrameId(value: number);
683
+ set isSelected(value: boolean);
684
+ constructor(block: BABYLON.NodeMaterialBlock, globalState: GlobalState);
685
+ isOverlappingFrame(frame: GraphFrame): boolean;
686
+ getPortForConnectionPoint(point: BABYLON.NodeMaterialConnectionPoint): NodePort | null;
687
+ getLinksForConnectionPoint(point: BABYLON.NodeMaterialConnectionPoint): NodeLink[];
688
+ private _refreshFrames;
689
+ _refreshLinks(): void;
690
+ refresh(): void;
691
+ private _onDown;
692
+ cleanAccumulation(useCeil?: boolean): void;
693
+ private _onUp;
694
+ private _onMove;
695
+ renderProperties(): BABYLON.Nullable<JSX.Element>;
696
+ appendVisual(root: HTMLDivElement, owner: GraphCanvasComponent): void;
697
+ dispose(): void;
698
+ }
699
+
700
+
701
+ export class NodeLink {
702
+ private _graphCanvas;
703
+ private _portA;
704
+ private _portB?;
705
+ private _nodeA;
706
+ private _nodeB?;
707
+ private _path;
708
+ private _selectionPath;
709
+ private _onSelectionChangedObserver;
710
+ private _isVisible;
711
+ onDisposedObservable: BABYLON.Observable<NodeLink>;
712
+ get isVisible(): boolean;
713
+ set isVisible(value: boolean);
714
+ get portA(): NodePort | FrameNodePort;
715
+ get portB(): NodePort | FrameNodePort | undefined;
716
+ get nodeA(): GraphNode;
717
+ get nodeB(): GraphNode | undefined;
718
+ update(endX?: number, endY?: number, straight?: boolean): void;
719
+ constructor(graphCanvas: GraphCanvasComponent, portA: NodePort, nodeA: GraphNode, portB?: NodePort, nodeB?: GraphNode);
720
+ onClick(evt: MouseEvent): void;
721
+ dispose(notify?: boolean): void;
722
+ }
723
+
724
+
725
+ export class NodePort {
726
+ connectionPoint: BABYLON.NodeMaterialConnectionPoint;
727
+ node: GraphNode;
728
+ protected _element: HTMLDivElement;
729
+ protected _img: HTMLImageElement;
730
+ protected _globalState: GlobalState;
731
+ protected _portLabelElement: Element;
732
+ protected _onCandidateLinkMovedObserver: BABYLON.Nullable<BABYLON.Observer<BABYLON.Nullable<BABYLON.Vector2>>>;
733
+ protected _onSelectionChangedObserver: BABYLON.Nullable<BABYLON.Observer<BABYLON.Nullable<ISelectionChangedOptions>>>;
734
+ protected _exposedOnFrame: boolean;
735
+ delegatedPort: BABYLON.Nullable<FrameNodePort>;
736
+ get element(): HTMLDivElement;
737
+ get portName(): string;
738
+ set portName(newName: string);
739
+ get disabled(): boolean;
740
+ hasLabel(): boolean;
741
+ get exposedOnFrame(): boolean;
742
+ set exposedOnFrame(value: boolean);
743
+ get exposedPortPosition(): number;
744
+ set exposedPortPosition(value: number);
745
+ private _isConnectedToNodeOutsideOfFrame;
746
+ refresh(): void;
747
+ constructor(portContainer: HTMLElement, connectionPoint: BABYLON.NodeMaterialConnectionPoint, node: GraphNode, globalState: GlobalState);
748
+ dispose(): void;
749
+ static CreatePortElement(connectionPoint: BABYLON.NodeMaterialConnectionPoint, node: GraphNode, root: HTMLElement, displayManager: BABYLON.Nullable<IDisplayManager>, globalState: GlobalState): NodePort;
750
+ }
751
+
752
+
753
+ export class ColorMergerPropertyTabComponent extends React.Component<IPropertyComponentProps> {
754
+ constructor(props: IPropertyComponentProps);
755
+ render(): JSX.Element;
756
+ }
757
+
758
+
759
+ export class ConditionalPropertyTabComponent extends React.Component<IPropertyComponentProps> {
760
+ constructor(props: IPropertyComponentProps);
761
+ render(): JSX.Element;
762
+ }
763
+
764
+
765
+ export interface IFrameNodePortPropertyTabComponentProps {
766
+ globalState: GlobalState;
767
+ frameNodePort: FrameNodePort;
768
+ frame: GraphFrame;
769
+ }
770
+ export class FrameNodePortPropertyTabComponent extends React.Component<IFrameNodePortPropertyTabComponentProps, {
771
+ port: FrameNodePort;
772
+ }> {
773
+ private _onFramePortPositionChangedObserver;
774
+ private _onSelectionChangedObserver;
775
+ constructor(props: IFrameNodePortPropertyTabComponentProps);
776
+ componentWillUnmount(): void;
777
+ render(): JSX.Element;
778
+ }
779
+
780
+
781
+ export interface IFramePropertyTabComponentProps {
782
+ globalState: GlobalState;
783
+ frame: GraphFrame;
784
+ }
785
+ export class FramePropertyTabComponent extends React.Component<IFramePropertyTabComponentProps> {
786
+ private _onFrameExpandStateChangedObserver;
787
+ constructor(props: IFramePropertyTabComponentProps);
788
+ componentDidMount(): void;
789
+ componentWillUnmount(): void;
790
+ render(): JSX.Element;
791
+ }
792
+
793
+
794
+ export class GenericPropertyComponent extends React.Component<IPropertyComponentProps> {
795
+ constructor(props: IPropertyComponentProps);
796
+ render(): JSX.Element;
797
+ }
798
+ export class GeneralPropertyTabComponent extends React.Component<IPropertyComponentProps> {
799
+ constructor(props: IPropertyComponentProps);
800
+ render(): JSX.Element;
801
+ }
802
+ export class GenericPropertyTabComponent extends React.Component<IPropertyComponentProps> {
803
+ constructor(props: IPropertyComponentProps);
804
+ forceRebuild(notifiers?: {
805
+ rebuild?: boolean;
806
+ update?: boolean;
807
+ activatePreviewCommand?: boolean;
808
+ callback?: (scene: BABYLON.Scene) => void;
809
+ }): void;
810
+ render(): JSX.Element;
811
+ }
812
+
813
+
814
+ export class GradientPropertyTabComponent extends React.Component<IPropertyComponentProps> {
815
+ private _onValueChangedObserver;
816
+ constructor(props: IPropertyComponentProps);
817
+ componentDidMount(): void;
818
+ componentWillUnmount(): void;
819
+ forceRebuild(): void;
820
+ deleteStep(step: BABYLON.GradientBlockColorStep): void;
821
+ copyStep(step: BABYLON.GradientBlockColorStep): void;
822
+ addNewStep(): void;
823
+ checkForReOrder(): void;
824
+ render(): JSX.Element;
825
+ }
826
+
827
+
828
+ interface IGradientStepComponentProps {
829
+ globalState: GlobalState;
830
+ step: BABYLON.GradientBlockColorStep;
831
+ lineIndex: number;
832
+ onDelete: () => void;
833
+ onUpdateStep: () => void;
834
+ onCheckForReOrder: () => void;
835
+ onCopy?: () => void;
836
+ }
837
+ export class GradientStepComponent extends React.Component<IGradientStepComponentProps, {
838
+ gradient: number;
839
+ }> {
840
+ constructor(props: IGradientStepComponentProps);
841
+ updateColor(color: string): void;
842
+ updateStep(gradient: number): void;
843
+ onPointerUp(): void;
844
+ render(): JSX.Element;
845
+ }
846
+
847
+
848
+ export class ImageSourcePropertyTabComponent extends React.Component<IPropertyComponentProps, {
849
+ isEmbedded: boolean;
850
+ }> {
851
+ get imageSourceBlock(): BABYLON.ImageSourceBlock;
852
+ constructor(props: IPropertyComponentProps);
853
+ UNSAFE_componentWillUpdate(nextProps: IPropertyComponentProps, nextState: {
854
+ isEmbedded: boolean;
855
+ loadAsCubeTexture: boolean;
856
+ }): void;
857
+ private _generateRandomForCache;
858
+ updateAfterTextureLoad(): void;
859
+ removeTexture(): void;
860
+ _prepareTexture(): void;
861
+ /**
862
+ * Replaces the texture of the node
863
+ * @param file the file of the texture to use
864
+ */
865
+ replaceTexture(file: File): void;
866
+ replaceTextureWithUrl(url: string): void;
867
+ render(): JSX.Element;
868
+ }
869
+
870
+
871
+ export class InputPropertyTabComponent extends React.Component<IPropertyComponentProps> {
872
+ private _onValueChangedObserver;
873
+ constructor(props: IPropertyComponentProps);
874
+ componentDidMount(): void;
875
+ componentWillUnmount(): void;
876
+ renderValue(globalState: GlobalState): JSX.Element | null;
877
+ setDefaultValue(): void;
878
+ render(): JSX.Element;
879
+ }
880
+
881
+
882
+ export class LightInformationPropertyTabComponent extends React.Component<IPropertyComponentProps> {
883
+ render(): JSX.Element;
884
+ }
885
+
886
+
887
+ export class LightPropertyTabComponent extends React.Component<IPropertyComponentProps> {
888
+ render(): JSX.Element;
889
+ }
890
+
891
+
892
+ export interface IFrameNodePortPropertyTabComponentProps {
893
+ globalState: GlobalState;
894
+ nodePort: NodePort;
895
+ }
896
+ export class NodePortPropertyTabComponent extends React.Component<IFrameNodePortPropertyTabComponentProps> {
897
+ private _onSelectionChangedObserver;
898
+ constructor(props: IFrameNodePortPropertyTabComponentProps);
899
+ componentWillUnmount(): void;
900
+ toggleExposeOnFrame(value: boolean): void;
901
+ render(): JSX.Element;
902
+ }
903
+
904
+
905
+ export interface IPropertyComponentProps {
906
+ globalState: GlobalState;
907
+ block: BABYLON.NodeMaterialBlock;
908
+ }
909
+
910
+
911
+ type ReflectionTexture = BABYLON.ReflectionTextureBlock | BABYLON.ReflectionBlock | BABYLON.RefractionBlock;
912
+ type AnyTexture = BABYLON.TextureBlock | ReflectionTexture | BABYLON.CurrentScreenBlock | BABYLON.ParticleTextureBlock;
913
+ export class TexturePropertyTabComponent extends React.Component<IPropertyComponentProps, {
914
+ isEmbedded: boolean;
915
+ loadAsCubeTexture: boolean;
916
+ textureIsPrefiltered: boolean;
917
+ }> {
918
+ get textureBlock(): AnyTexture;
919
+ constructor(props: IPropertyComponentProps);
920
+ UNSAFE_componentWillUpdate(nextProps: IPropertyComponentProps, nextState: {
921
+ isEmbedded: boolean;
922
+ loadAsCubeTexture: boolean;
923
+ }): void;
924
+ private _generateRandomForCache;
925
+ updateAfterTextureLoad(): void;
926
+ removeTexture(): void;
927
+ _prepareTexture(): void;
928
+ /**
929
+ * Replaces the texture of the node
930
+ * @param file the file of the texture to use
931
+ */
932
+ replaceTexture(file: File): void;
933
+ replaceTextureWithUrl(url: string): void;
934
+ render(): JSX.Element;
935
+ }
936
+
937
+
938
+ export class TransformPropertyTabComponent extends React.Component<IPropertyComponentProps> {
939
+ constructor(props: IPropertyComponentProps);
940
+ render(): JSX.Element;
941
+ }
942
+
943
+
944
+ export class TrigonometryPropertyTabComponent extends React.Component<IPropertyComponentProps> {
945
+ constructor(props: IPropertyComponentProps);
946
+ render(): JSX.Element;
947
+ }
948
+
949
+
950
+ export class VectorMergerPropertyTabComponent extends React.Component<IPropertyComponentProps> {
951
+ constructor(props: IPropertyComponentProps);
952
+ render(): JSX.Element;
953
+ }
954
+
955
+
956
+ export class PropertyLedger {
957
+ static RegisteredControls: {
958
+ [key: string]: React.ComponentClass<IPropertyComponentProps>;
959
+ };
960
+ }
961
+
962
+
963
+ export class ISelectionChangedOptions {
964
+ selection: BABYLON.Nullable<GraphNode | NodeLink | GraphFrame | NodePort | FramePortData>;
965
+ forceKeepSelection?: boolean;
966
+ }
967
+ export class GlobalState {
968
+ nodeMaterial: BABYLON.NodeMaterial;
969
+ hostElement: HTMLElement;
970
+ hostDocument: HTMLDocument;
971
+ hostWindow: Window;
972
+ onNewNodeCreatedObservable: BABYLON.Observable<GraphNode>;
973
+ onSelectionChangedObservable: BABYLON.Observable<BABYLON.Nullable<ISelectionChangedOptions>>;
974
+ onRebuildRequiredObservable: BABYLON.Observable<boolean>;
975
+ onBuiltObservable: BABYLON.Observable<void>;
976
+ onResetRequiredObservable: BABYLON.Observable<void>;
977
+ onUpdateRequiredObservable: BABYLON.Observable<BABYLON.Nullable<BABYLON.NodeMaterialBlock>>;
978
+ onZoomToFitRequiredObservable: BABYLON.Observable<void>;
979
+ onReOrganizedRequiredObservable: BABYLON.Observable<void>;
980
+ onLogRequiredObservable: BABYLON.Observable<LogEntry>;
981
+ onErrorMessageDialogRequiredObservable: BABYLON.Observable<string>;
982
+ onIsLoadingChanged: BABYLON.Observable<boolean>;
983
+ onPreviewCommandActivated: BABYLON.Observable<boolean>;
984
+ onLightUpdated: BABYLON.Observable<void>;
985
+ onPreviewBackgroundChanged: BABYLON.Observable<void>;
986
+ onBackFaceCullingChanged: BABYLON.Observable<void>;
987
+ onDepthPrePassChanged: BABYLON.Observable<void>;
988
+ onAnimationCommandActivated: BABYLON.Observable<void>;
989
+ onCandidateLinkMoved: BABYLON.Observable<BABYLON.Nullable<BABYLON.Vector2>>;
990
+ onSelectionBoxMoved: BABYLON.Observable<ClientRect | DOMRect>;
991
+ onFrameCreatedObservable: BABYLON.Observable<GraphFrame>;
992
+ onCandidatePortSelectedObservable: BABYLON.Observable<BABYLON.Nullable<NodePort | FrameNodePort>>;
993
+ onImportFrameObservable: BABYLON.Observable<any>;
994
+ onGraphNodeRemovalObservable: BABYLON.Observable<GraphNode>;
995
+ onPopupClosedObservable: BABYLON.Observable<void>;
996
+ onNewBlockRequiredObservable: BABYLON.Observable<{
997
+ type: string;
998
+ targetX: number;
999
+ targetY: number;
1000
+ needRepositioning?: boolean | undefined;
1001
+ }>;
1002
+ onGetNodeFromBlock: (block: BABYLON.NodeMaterialBlock) => GraphNode;
1003
+ onGridSizeChanged: BABYLON.Observable<void>;
1004
+ onExposePortOnFrameObservable: BABYLON.Observable<GraphNode>;
1005
+ previewType: PreviewType;
1006
+ previewFile: File;
1007
+ particleSystemBlendMode: number;
1008
+ listOfCustomPreviewFiles: File[];
1009
+ rotatePreview: boolean;
1010
+ backgroundColor: BABYLON.Color4;
1011
+ backFaceCulling: boolean;
1012
+ depthPrePass: boolean;
1013
+ blockKeyboardEvents: boolean;
1014
+ hemisphericLight: boolean;
1015
+ directionalLight0: boolean;
1016
+ directionalLight1: boolean;
1017
+ controlCamera: boolean;
1018
+ storeEditorData: (serializationObject: any, frame?: BABYLON.Nullable<GraphFrame>) => void;
1019
+ _mode: BABYLON.NodeMaterialModes;
1020
+ /** Gets the mode */
1021
+ get mode(): BABYLON.NodeMaterialModes;
1022
+ /** Sets the mode */
1023
+ set mode(m: BABYLON.NodeMaterialModes);
1024
+ customSave?: {
1025
+ label: string;
1026
+ action: (data: string) => Promise<void>;
1027
+ };
1028
+ constructor();
1029
+ }
1030
+
1031
+
1032
+ interface IGraphEditorProps {
1033
+ globalState: GlobalState;
1034
+ }
1035
+ interface IGraphEditorState {
1036
+ showPreviewPopUp: boolean;
1037
+ }
1038
+ interface IInternalPreviewAreaOptions extends BABYLON.IInspectorOptions {
1039
+ popup: boolean;
1040
+ original: boolean;
1041
+ explorerWidth?: string;
1042
+ inspectorWidth?: string;
1043
+ embedHostWidth?: string;
1044
+ }
1045
+ export class GraphEditor extends React.Component<IGraphEditorProps, IGraphEditorState> {
1046
+ static readonly NodeWidth = 100;
1047
+ private _graphCanvasRef;
1048
+ private _diagramContainerRef;
1049
+ private _graphCanvas;
1050
+ private _diagramContainer;
1051
+ private _startX;
1052
+ private _moveInProgress;
1053
+ private _leftWidth;
1054
+ private _rightWidth;
1055
+ private _blocks;
1056
+ private _previewManager;
1057
+ private _copiedNodes;
1058
+ private _copiedFrames;
1059
+ private _mouseLocationX;
1060
+ private _mouseLocationY;
1061
+ private _onWidgetKeyUpPointer;
1062
+ private _previewHost;
1063
+ private _popUpWindow;
1064
+ /**
1065
+ * Creates a node and recursivly creates its parent nodes from it's input
1066
+ * @param block
1067
+ * @param recursion
1068
+ */
1069
+ createNodeFromObject(block: BABYLON.NodeMaterialBlock, recursion?: boolean): GraphNode;
1070
+ addValueNode(type: string): GraphNode;
1071
+ componentDidMount(): void;
1072
+ componentWillUnmount(): void;
1073
+ constructor(props: IGraphEditorProps);
1074
+ reconnectNewNodes(nodeIndex: number, newNodes: GraphNode[], sourceNodes: GraphNode[], done: boolean[]): void;
1075
+ pasteSelection(copiedNodes: GraphNode[], currentX: number, currentY: number, selectNew?: boolean): GraphNode[] | undefined;
1076
+ zoomToFit(): void;
1077
+ buildMaterial(autoConfigure?: boolean): void;
1078
+ build(): void;
1079
+ loadGraph(): void;
1080
+ showWaitScreen(): void;
1081
+ hideWaitScreen(): void;
1082
+ reOrganize(editorData?: BABYLON.Nullable<IEditorData>, isImportingAFrame?: boolean): void;
1083
+ onPointerDown(evt: React.PointerEvent<HTMLDivElement>): void;
1084
+ onPointerUp(evt: React.PointerEvent<HTMLDivElement>): void;
1085
+ resizeColumns(evt: React.PointerEvent<HTMLDivElement>, forLeft?: boolean): void;
1086
+ buildColumnLayout(): string;
1087
+ emitNewBlock(blockType: string, targetX: number, targetY: number): void;
1088
+ dropNewBlock(event: React.DragEvent<HTMLDivElement>): void;
1089
+ handlePopUp: () => void;
1090
+ handleClosingPopUp: () => void;
1091
+ initiatePreviewArea: (canvas?: HTMLCanvasElement) => void;
1092
+ createPopUp: () => void;
1093
+ createPopupWindow: (title: string, windowVariableName: string, width?: number, height?: number) => Window | null;
1094
+ createPreviewMeshControlHost: (options: IInternalPreviewAreaOptions, parentControl: BABYLON.Nullable<HTMLElement>) => void;
1095
+ createPreviewHost: (options: IInternalPreviewAreaOptions, parentControl: BABYLON.Nullable<HTMLElement>) => void;
1096
+ fixPopUpStyles: (document: Document) => void;
1097
+ render(): JSX.Element;
1098
+ }
1099
+
1100
+
1101
+
1102
+
1103
+ /**
1104
+ * Interface used to specify creation options for the node editor
1105
+ */
1106
+ export interface INodeEditorOptions {
1107
+ nodeMaterial: BABYLON.NodeMaterial;
1108
+ hostElement?: HTMLElement;
1109
+ customSave?: {
1110
+ label: string;
1111
+ action: (data: string) => Promise<void>;
1112
+ };
1113
+ customLoadObservable?: BABYLON.Observable<any>;
1114
+ }
1115
+ /**
1116
+ * Class used to create a node editor
1117
+ */
1118
+ export class NodeEditor {
1119
+ private static _CurrentState;
1120
+ /**
1121
+ * Show the node editor
1122
+ * @param options defines the options to use to configure the node editor
1123
+ */
1124
+ static Show(options: INodeEditorOptions): void;
1125
+ }
1126
+
1127
+
1128
+ export interface INodeLocationInfo {
1129
+ blockId: number;
1130
+ x: number;
1131
+ y: number;
1132
+ }
1133
+ export interface IFrameData {
1134
+ x: number;
1135
+ y: number;
1136
+ width: number;
1137
+ height: number;
1138
+ color: number[];
1139
+ name: string;
1140
+ isCollapsed: boolean;
1141
+ blocks: number[];
1142
+ comments: string;
1143
+ }
1144
+ export interface IEditorData {
1145
+ locations: INodeLocationInfo[];
1146
+ x: number;
1147
+ y: number;
1148
+ zoom: number;
1149
+ frames?: IFrameData[];
1150
+ map?: {
1151
+ [key: number]: number;
1152
+ };
1153
+ }
1154
+
1155
+
1156
+ interface IPortalProps {
1157
+ globalState: GlobalState;
1158
+ }
1159
+ export class Portal extends React.Component<IPortalProps> {
1160
+ render(): React.ReactPortal;
1161
+ }
1162
+
1163
+
1164
+ export class SerializationTools {
1165
+ static UpdateLocations(material: BABYLON.NodeMaterial, globalState: GlobalState, frame?: BABYLON.Nullable<GraphFrame>): void;
1166
+ static Serialize(material: BABYLON.NodeMaterial, globalState: GlobalState, frame?: BABYLON.Nullable<GraphFrame>): string;
1167
+ static Deserialize(serializationObject: any, globalState: GlobalState): void;
1168
+ static AddFrameToMaterial(serializationObject: any, globalState: GlobalState, currentMaterial: BABYLON.NodeMaterial): void;
1169
+ }
1170
+
1171
+
1172
+ export interface IButtonLineComponentProps {
1173
+ label: string;
1174
+ onClick: () => void;
1175
+ isDisabled?: boolean;
1176
+ }
1177
+ export class ButtonLineComponent extends React.Component<IButtonLineComponentProps> {
1178
+ constructor(props: IButtonLineComponentProps);
1179
+ render(): JSX.Element;
1180
+ }
1181
+
1182
+
1183
+ export interface ICheckBoxLineComponentProps {
1184
+ label: string;
1185
+ target?: any;
1186
+ propertyName?: string;
1187
+ isSelected?: () => boolean;
1188
+ onSelect?: (value: boolean) => void;
1189
+ onValueChanged?: () => void;
1190
+ onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
1191
+ disabled?: boolean;
1192
+ }
1193
+ export class CheckBoxLineComponent extends React.Component<ICheckBoxLineComponentProps, {
1194
+ isSelected: boolean;
1195
+ isDisabled?: boolean;
1196
+ }> {
1197
+ private static _UniqueIdSeed;
1198
+ private _uniqueId;
1199
+ private _localChange;
1200
+ constructor(props: ICheckBoxLineComponentProps);
1201
+ shouldComponentUpdate(nextProps: ICheckBoxLineComponentProps, nextState: {
1202
+ isSelected: boolean;
1203
+ isDisabled: boolean;
1204
+ }): boolean;
1205
+ onChange(): void;
1206
+ render(): JSX.Element;
1207
+ }
1208
+
1209
+
1210
+ export interface IColor3LineComponentProps {
1211
+ label: string;
1212
+ target: any;
1213
+ propertyName: string;
1214
+ onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
1215
+ onChange?: () => void;
1216
+ globalState: GlobalState;
1217
+ }
1218
+ interface IColor3LineComponentState {
1219
+ isExpanded: boolean;
1220
+ }
1221
+ export class Color3LineComponent extends React.Component<IColor3LineComponentProps, IColor3LineComponentState> {
1222
+ constructor(props: IColor3LineComponentProps);
1223
+ onChange(newValue: string): void;
1224
+ switchExpandState(): void;
1225
+ updateColor(newValue: BABYLON.Color3 | BABYLON.Color4): void;
1226
+ modifyColor(modifier: (previous: BABYLON.Color3 | BABYLON.Color4) => void): void;
1227
+ getCurrentColor(): BABYLON.Color3 | BABYLON.Color4;
1228
+ copyToClipboard(): void;
1229
+ render(): JSX.Element;
1230
+ }
1231
+
1232
+
1233
+ export interface IColor4LineComponentProps {
1234
+ label: string;
1235
+ target: any;
1236
+ propertyName: string;
1237
+ onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
1238
+ onChange?: () => void;
1239
+ globalState: GlobalState;
1240
+ }
1241
+ export class Color4LineComponent extends React.Component<IColor4LineComponentProps, {
1242
+ isExpanded: boolean;
1243
+ }> {
1244
+ constructor(props: IColor4LineComponentProps);
1245
+ onChange(newValue: string): void;
1246
+ switchExpandState(): void;
1247
+ updateColor(newValue: BABYLON.Color4): void;
1248
+ modifyColor(modifier: (previous: BABYLON.Color4) => void): void;
1249
+ getCurrentColor(): BABYLON.Color4;
1250
+ copyToClipboard(): void;
1251
+ render(): JSX.Element;
1252
+ }
1253
+
1254
+
1255
+ export interface IColorPickerComponentProps {
1256
+ value: BABYLON.Color4 | BABYLON.Color3;
1257
+ onColorChanged: (newOne: string) => void;
1258
+ globalState: GlobalState;
1259
+ }
1260
+ interface IColorPickerComponentState {
1261
+ pickerEnabled: boolean;
1262
+ color: BABYLON.Color3 | BABYLON.Color4;
1263
+ hex: string;
1264
+ }
1265
+ export class ColorPickerLineComponent extends React.Component<IColorPickerComponentProps, IColorPickerComponentState> {
1266
+ private _floatRef;
1267
+ private _floatHostRef;
1268
+ constructor(props: IColorPickerComponentProps);
1269
+ syncPositions(): void;
1270
+ shouldComponentUpdate(nextProps: IColorPickerComponentProps, nextState: IColorPickerComponentState): boolean;
1271
+ componentDidUpdate(): void;
1272
+ componentDidMount(): void;
1273
+ setPickerState(enabled: boolean): void;
1274
+ render(): JSX.Element;
1275
+ }
1276
+
1277
+
1278
+ export interface IButtonLineComponentProps {
1279
+ data: string;
1280
+ tooltip: string;
1281
+ }
1282
+ export class DraggableLineComponent extends React.Component<IButtonLineComponentProps> {
1283
+ constructor(props: IButtonLineComponentProps);
1284
+ render(): JSX.Element;
1285
+ }
1286
+
1287
+
1288
+ export interface IDraggableLineWithButtonComponent {
1289
+ data: string;
1290
+ tooltip: string;
1291
+ iconImage: any;
1292
+ onIconClick: (value: string) => void;
1293
+ iconTitle: string;
1294
+ lenSuffixToRemove?: number;
1295
+ }
1296
+ export class DraggableLineWithButtonComponent extends React.Component<IDraggableLineWithButtonComponent> {
1297
+ constructor(props: IDraggableLineWithButtonComponent);
1298
+ render(): JSX.Element;
1299
+ }
1300
+
1301
+
1302
+ interface IFileButtonLineComponentProps {
1303
+ label: string;
1304
+ onClick: (file: File) => void;
1305
+ accept: string;
1306
+ uploadName?: string;
1307
+ }
1308
+ export class FileButtonLineComponent extends React.Component<IFileButtonLineComponentProps> {
1309
+ private _uploadRef;
1310
+ constructor(props: IFileButtonLineComponentProps);
1311
+ onChange(evt: any): void;
1312
+ render(): JSX.Element;
1313
+ }
1314
+
1315
+
1316
+ interface IFloatLineComponentProps {
1317
+ label: string;
1318
+ target: any;
1319
+ propertyName: string;
1320
+ onChange?: (newValue: number) => void;
1321
+ isInteger?: boolean;
1322
+ onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
1323
+ additionalClass?: string;
1324
+ step?: string;
1325
+ digits?: number;
1326
+ globalState: GlobalState;
1327
+ min?: number;
1328
+ max?: number;
1329
+ smallUI?: boolean;
1330
+ onEnter?: (newValue: number) => void;
1331
+ }
1332
+ export class FloatLineComponent extends React.Component<IFloatLineComponentProps, {
1333
+ value: string;
1334
+ }> {
1335
+ private _localChange;
1336
+ private _store;
1337
+ private _regExp;
1338
+ private _onFocus;
1339
+ constructor(props: IFloatLineComponentProps);
1340
+ shouldComponentUpdate(nextProps: IFloatLineComponentProps, nextState: {
1341
+ value: string;
1342
+ }): boolean;
1343
+ componentWillUnmount(): void;
1344
+ raiseOnPropertyChanged(newValue: number, previousValue: number): void;
1345
+ updateValue(valueString: string): void;
1346
+ render(): JSX.Element;
1347
+ }
1348
+
1349
+
1350
+ interface ILineContainerComponentProps {
1351
+ title: string;
1352
+ children: any[] | any;
1353
+ closed?: boolean;
1354
+ }
1355
+ export class LineContainerComponent extends React.Component<ILineContainerComponentProps, {
1356
+ isExpanded: boolean;
1357
+ }> {
1358
+ constructor(props: ILineContainerComponentProps);
1359
+ switchExpandedState(): void;
1360
+ renderHeader(): JSX.Element;
1361
+ render(): JSX.Element;
1362
+ }
1363
+
1364
+
1365
+ interface ILineWithFileButtonComponentProps {
1366
+ title: string;
1367
+ closed?: boolean;
1368
+ label: string;
1369
+ iconImage: any;
1370
+ onIconClick: (file: File) => void;
1371
+ accept: string;
1372
+ uploadName?: string;
1373
+ }
1374
+ export class LineWithFileButtonComponent extends React.Component<ILineWithFileButtonComponentProps, {
1375
+ isExpanded: boolean;
1376
+ }> {
1377
+ private _uploadRef;
1378
+ constructor(props: ILineWithFileButtonComponentProps);
1379
+ onChange(evt: any): void;
1380
+ switchExpandedState(): void;
1381
+ render(): JSX.Element;
1382
+ }
1383
+
1384
+
1385
+ interface IMatrixLineComponentProps {
1386
+ label: string;
1387
+ target: any;
1388
+ propertyName: string;
1389
+ step?: number;
1390
+ onChange?: (newValue: BABYLON.Matrix) => void;
1391
+ onModeChange?: (mode: number) => void;
1392
+ onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
1393
+ mode?: number;
1394
+ globalState: GlobalState;
1395
+ }
1396
+ export class MatrixLineComponent extends React.Component<IMatrixLineComponentProps, {
1397
+ value: BABYLON.Matrix;
1398
+ mode: number;
1399
+ angle: number;
1400
+ }> {
1401
+ private _localChange;
1402
+ constructor(props: IMatrixLineComponentProps);
1403
+ shouldComponentUpdate(nextProps: IMatrixLineComponentProps, nextState: {
1404
+ value: BABYLON.Matrix;
1405
+ mode: number;
1406
+ angle: number;
1407
+ }): boolean;
1408
+ raiseOnPropertyChanged(previousValue: BABYLON.Vector3): void;
1409
+ updateMatrix(): void;
1410
+ updateRow(value: BABYLON.Vector4, row: number): void;
1411
+ updateBasedOnMode(value: number): void;
1412
+ render(): JSX.Element;
1413
+ }
1414
+
1415
+
1416
+ interface IMessageDialogComponentProps {
1417
+ globalState: GlobalState;
1418
+ }
1419
+ export class MessageDialogComponent extends React.Component<IMessageDialogComponentProps, {
1420
+ message: string;
1421
+ isError: boolean;
1422
+ }> {
1423
+ constructor(props: IMessageDialogComponentProps);
1424
+ render(): JSX.Element | null;
1425
+ }
1426
+
1427
+
1428
+ interface INumericInputComponentProps {
1429
+ label: string;
1430
+ value: number;
1431
+ step?: number;
1432
+ onChange: (value: number) => void;
1433
+ globalState: GlobalState;
1434
+ }
1435
+ export class NumericInputComponent extends React.Component<INumericInputComponentProps, {
1436
+ value: string;
1437
+ }> {
1438
+ static defaultProps: {
1439
+ step: number;
1440
+ };
1441
+ private _localChange;
1442
+ constructor(props: INumericInputComponentProps);
1443
+ shouldComponentUpdate(nextProps: INumericInputComponentProps, nextState: {
1444
+ value: string;
1445
+ }): boolean;
1446
+ updateValue(evt: any): void;
1447
+ render(): JSX.Element;
1448
+ }
1449
+
1450
+
1451
+ interface IOptionsLineComponentProps {
1452
+ label: string;
1453
+ target: any;
1454
+ className?: string;
1455
+ propertyName?: string;
1456
+ options: BABYLON.IInspectableOptions[];
1457
+ noDirectUpdate?: boolean;
1458
+ onSelect?: (value: number | string) => void;
1459
+ onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
1460
+ valuesAreStrings?: boolean;
1461
+ defaultIfNull?: number;
1462
+ getSelection?: (target: any) => number;
1463
+ }
1464
+ export class OptionsLineComponent extends React.Component<IOptionsLineComponentProps, {
1465
+ value: number | string;
1466
+ }> {
1467
+ private _localChange;
1468
+ private _getValue;
1469
+ constructor(props: IOptionsLineComponentProps);
1470
+ setValue(value: string | number): void;
1471
+ shouldComponentUpdate(nextProps: IOptionsLineComponentProps, nextState: {
1472
+ value: number;
1473
+ }): boolean;
1474
+ raiseOnPropertyChanged(newValue: number | string, previousValue: number | string): void;
1475
+ updateValue(valueString: string): void;
1476
+ render(): JSX.Element;
1477
+ }
1478
+
1479
+
1480
+ export class Popup {
1481
+ static CreatePopup(title: string, windowVariableName: string, width?: number, height?: number): HTMLDivElement | null;
1482
+ static _CopyStyles(sourceDoc: HTMLDocument, targetDoc: HTMLDocument): void;
1483
+ }
1484
+
1485
+
1486
+ export class PropertyChangedEvent {
1487
+ object: any;
1488
+ property: string;
1489
+ value: any;
1490
+ initialValue: any;
1491
+ }
1492
+
1493
+
1494
+ interface ISliderLineComponentProps {
1495
+ label: string;
1496
+ target?: any;
1497
+ propertyName?: string;
1498
+ minimum: number;
1499
+ maximum: number;
1500
+ step: number;
1501
+ directValue?: number;
1502
+ useEuler?: boolean;
1503
+ onChange?: (value: number) => void;
1504
+ onInput?: (value: number) => void;
1505
+ onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
1506
+ decimalCount?: number;
1507
+ globalState: GlobalState;
1508
+ }
1509
+ export class SliderLineComponent extends React.Component<ISliderLineComponentProps, {
1510
+ value: number;
1511
+ }> {
1512
+ private _localChange;
1513
+ constructor(props: ISliderLineComponentProps);
1514
+ shouldComponentUpdate(nextProps: ISliderLineComponentProps, nextState: {
1515
+ value: number;
1516
+ }): boolean;
1517
+ onChange(newValueString: any): void;
1518
+ onInput(newValueString: any): void;
1519
+ prepareDataToRead(value: number): number;
1520
+ render(): JSX.Element;
1521
+ }
1522
+
1523
+
1524
+ interface ITextInputLineComponentProps {
1525
+ label: string;
1526
+ globalState: GlobalState;
1527
+ target?: any;
1528
+ propertyName?: string;
1529
+ value?: string;
1530
+ multilines?: boolean;
1531
+ onChange?: (value: string) => void;
1532
+ validator?: (value: string) => boolean;
1533
+ onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
1534
+ }
1535
+ export class TextInputLineComponent extends React.Component<ITextInputLineComponentProps, {
1536
+ value: string;
1537
+ }> {
1538
+ private _localChange;
1539
+ private _onFocus;
1540
+ constructor(props: ITextInputLineComponentProps);
1541
+ shouldComponentUpdate(nextProps: ITextInputLineComponentProps, nextState: {
1542
+ value: string;
1543
+ }): boolean;
1544
+ componentWillUnmount(): void;
1545
+ raiseOnPropertyChanged(newValue: string, previousValue: string): void;
1546
+ updateValue(value: string, raisePropertyChanged: boolean): void;
1547
+ render(): JSX.Element;
1548
+ }
1549
+
1550
+
1551
+ interface ITextLineComponentProps {
1552
+ label: string;
1553
+ value: string;
1554
+ color?: string;
1555
+ underline?: boolean;
1556
+ onLink?: () => void;
1557
+ }
1558
+ export class TextLineComponent extends React.Component<ITextLineComponentProps> {
1559
+ constructor(props: ITextLineComponentProps);
1560
+ onLink(): void;
1561
+ renderContent(): JSX.Element;
1562
+ render(): JSX.Element;
1563
+ }
1564
+
1565
+
1566
+ interface ITextureLineComponentProps {
1567
+ texture: BABYLON.BaseTexture;
1568
+ width: number;
1569
+ height: number;
1570
+ globalState?: any;
1571
+ hideChannelSelect?: boolean;
1572
+ }
1573
+ export interface ITextureLineComponentState {
1574
+ displayRed: boolean;
1575
+ displayGreen: boolean;
1576
+ displayBlue: boolean;
1577
+ displayAlpha: boolean;
1578
+ face: number;
1579
+ }
1580
+ export class TextureLineComponent extends React.Component<ITextureLineComponentProps, ITextureLineComponentState> {
1581
+ private _canvasRef;
1582
+ constructor(props: ITextureLineComponentProps);
1583
+ shouldComponentUpdate(): boolean;
1584
+ componentDidMount(): void;
1585
+ componentDidUpdate(): void;
1586
+ updatePreview(): void;
1587
+ static UpdatePreview(previewCanvas: HTMLCanvasElement, texture: BABYLON.BaseTexture, width: number, options: ITextureLineComponentState, onReady?: () => void, globalState?: any): Promise<void>;
1588
+ render(): JSX.Element;
1589
+ }
1590
+
1591
+
1592
+ interface IVector2LineComponentProps {
1593
+ label: string;
1594
+ target: any;
1595
+ propertyName: string;
1596
+ step?: number;
1597
+ onChange?: (newvalue: BABYLON.Vector2) => void;
1598
+ onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
1599
+ globalState: GlobalState;
1600
+ }
1601
+ export class Vector2LineComponent extends React.Component<IVector2LineComponentProps, {
1602
+ isExpanded: boolean;
1603
+ value: BABYLON.Vector2;
1604
+ }> {
1605
+ static defaultProps: {
1606
+ step: number;
1607
+ };
1608
+ private _localChange;
1609
+ constructor(props: IVector2LineComponentProps);
1610
+ shouldComponentUpdate(nextProps: IVector2LineComponentProps, nextState: {
1611
+ isExpanded: boolean;
1612
+ value: BABYLON.Vector2;
1613
+ }): boolean;
1614
+ switchExpandState(): void;
1615
+ raiseOnPropertyChanged(previousValue: BABYLON.Vector2): void;
1616
+ updateStateX(value: number): void;
1617
+ updateStateY(value: number): void;
1618
+ render(): JSX.Element;
1619
+ }
1620
+
1621
+
1622
+ interface IVector3LineComponentProps {
1623
+ label: string;
1624
+ target: any;
1625
+ propertyName: string;
1626
+ step?: number;
1627
+ onChange?: (newvalue: BABYLON.Vector3) => void;
1628
+ onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
1629
+ globalState: GlobalState;
1630
+ }
1631
+ export class Vector3LineComponent extends React.Component<IVector3LineComponentProps, {
1632
+ isExpanded: boolean;
1633
+ value: BABYLON.Vector3;
1634
+ }> {
1635
+ static defaultProps: {
1636
+ step: number;
1637
+ };
1638
+ private _localChange;
1639
+ constructor(props: IVector3LineComponentProps);
1640
+ shouldComponentUpdate(nextProps: IVector3LineComponentProps, nextState: {
1641
+ isExpanded: boolean;
1642
+ value: BABYLON.Vector3;
1643
+ }): boolean;
1644
+ switchExpandState(): void;
1645
+ raiseOnPropertyChanged(previousValue: BABYLON.Vector3): void;
1646
+ updateVector3(): void;
1647
+ updateStateX(value: number): void;
1648
+ updateStateY(value: number): void;
1649
+ updateStateZ(value: number): void;
1650
+ render(): JSX.Element;
1651
+ }
1652
+
1653
+
1654
+ interface IVector4LineComponentProps {
1655
+ label: string;
1656
+ target?: any;
1657
+ propertyName?: string;
1658
+ value?: BABYLON.Vector4;
1659
+ step?: number;
1660
+ onChange?: (newvalue: BABYLON.Vector4) => void;
1661
+ onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
1662
+ globalState: GlobalState;
1663
+ }
1664
+ export class Vector4LineComponent extends React.Component<IVector4LineComponentProps, {
1665
+ isExpanded: boolean;
1666
+ value: BABYLON.Vector4;
1667
+ }> {
1668
+ static defaultProps: {
1669
+ step: number;
1670
+ };
1671
+ private _localChange;
1672
+ constructor(props: IVector4LineComponentProps);
1673
+ shouldComponentUpdate(nextProps: IVector4LineComponentProps, nextState: {
1674
+ isExpanded: boolean;
1675
+ value: BABYLON.Vector4;
1676
+ }): boolean;
1677
+ switchExpandState(): void;
1678
+ raiseOnPropertyChanged(previousValue: BABYLON.Vector4): void;
1679
+ updateVector4(): void;
1680
+ updateStateX(value: number): void;
1681
+ updateStateY(value: number): void;
1682
+ updateStateZ(value: number): void;
1683
+ updateStateW(value: number): void;
1684
+ render(): JSX.Element;
1685
+ }
1686
+
1687
+
1688
+ export interface IColorComponentEntryProps {
1689
+ value: number;
1690
+ label: string;
1691
+ max?: number;
1692
+ min?: number;
1693
+ onChange: (value: number) => void;
1694
+ disabled?: boolean;
1695
+ }
1696
+ export class ColorComponentEntry extends React.Component<IColorComponentEntryProps> {
1697
+ constructor(props: IColorComponentEntryProps);
1698
+ updateValue(valueString: string): void;
1699
+ render(): JSX.Element;
1700
+ }
1701
+
1702
+
1703
+ /**
1704
+ * Interface used to specify creation options for color picker
1705
+ */
1706
+ export interface IColorPickerProps {
1707
+ color: BABYLON.Color3 | BABYLON.Color4;
1708
+ linearhint?: boolean;
1709
+ debugMode?: boolean;
1710
+ onColorChanged?: (color: BABYLON.Color3 | BABYLON.Color4) => void;
1711
+ }
1712
+ /**
1713
+ * Interface used to specify creation options for color picker
1714
+ */
1715
+ export interface IColorPickerState {
1716
+ color: BABYLON.Color3;
1717
+ alpha: number;
1718
+ }
1719
+ /**
1720
+ * Class used to create a color picker
1721
+ */
1722
+ export class ColorPicker extends React.Component<IColorPickerProps, IColorPickerState> {
1723
+ private _saturationRef;
1724
+ private _hueRef;
1725
+ private _isSaturationPointerDown;
1726
+ private _isHuePointerDown;
1727
+ constructor(props: IColorPickerProps);
1728
+ shouldComponentUpdate(nextProps: IColorPickerProps, nextState: IColorPickerState): boolean;
1729
+ onSaturationPointerDown(evt: React.PointerEvent<HTMLDivElement>): void;
1730
+ onSaturationPointerUp(evt: React.PointerEvent<HTMLDivElement>): void;
1731
+ onSaturationPointerMove(evt: React.PointerEvent<HTMLDivElement>): void;
1732
+ onHuePointerDown(evt: React.PointerEvent<HTMLDivElement>): void;
1733
+ onHuePointerUp(evt: React.PointerEvent<HTMLDivElement>): void;
1734
+ onHuePointerMove(evt: React.PointerEvent<HTMLDivElement>): void;
1735
+ private _evaluateSaturation;
1736
+ private _evaluateHue;
1737
+ componentDidUpdate(): void;
1738
+ raiseOnColorChanged(): void;
1739
+ render(): JSX.Element;
1740
+ }
1741
+
1742
+
1743
+ export interface IHexColorProps {
1744
+ value: string;
1745
+ expectedLength: number;
1746
+ onChange: (value: string) => void;
1747
+ }
1748
+ export class HexColor extends React.Component<IHexColorProps, {
1749
+ hex: string;
1750
+ }> {
1751
+ constructor(props: IHexColorProps);
1752
+ shouldComponentUpdate(nextProps: IHexColorProps, nextState: {
1753
+ hex: string;
1754
+ }): boolean;
1755
+ updateHexValue(valueString: string): void;
1756
+ render(): JSX.Element;
1757
+ }
1758
+
1759
+
1760
+ export interface IBooleanLineComponentProps {
1761
+ label: string;
1762
+ value: boolean;
1763
+ icon?: string;
1764
+ iconLabel?: string;
1765
+ }
1766
+ export class BooleanLineComponent extends React.Component<IBooleanLineComponentProps> {
1767
+ constructor(props: IBooleanLineComponentProps);
1768
+ render(): JSX.Element;
1769
+ }
1770
+
1771
+
1772
+ export interface IButtonLineComponentProps {
1773
+ label: string;
1774
+ onClick: () => void;
1775
+ icon?: string;
1776
+ iconLabel?: string;
1777
+ }
1778
+ export class ButtonLineComponent extends React.Component<IButtonLineComponentProps> {
1779
+ constructor(props: IButtonLineComponentProps);
1780
+ render(): JSX.Element;
1781
+ }
1782
+
1783
+
1784
+ export interface ICheckBoxLineComponentProps {
1785
+ label?: string;
1786
+ target?: any;
1787
+ propertyName?: string;
1788
+ isSelected?: () => boolean;
1789
+ onSelect?: (value: boolean) => void;
1790
+ onValueChanged?: () => void;
1791
+ onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
1792
+ disabled?: boolean;
1793
+ icon?: string;
1794
+ iconLabel?: string;
1795
+ faIcons?: {
1796
+ enabled: any;
1797
+ disabled: any;
1798
+ };
1799
+ large?: boolean;
1800
+ }
1801
+ export class CheckBoxLineComponent extends React.Component<ICheckBoxLineComponentProps, {
1802
+ isSelected: boolean;
1803
+ isDisabled?: boolean;
1804
+ isConflict: boolean;
1805
+ }> {
1806
+ private _localChange;
1807
+ constructor(props: ICheckBoxLineComponentProps);
1808
+ shouldComponentUpdate(nextProps: ICheckBoxLineComponentProps, nextState: {
1809
+ isSelected: boolean;
1810
+ isDisabled: boolean;
1811
+ isConflict: boolean;
1812
+ }): boolean;
1813
+ onChange(): void;
1814
+ render(): JSX.Element;
1815
+ }
1816
+
1817
+
1818
+ export interface IColor3LineComponentProps {
1819
+ label: string;
1820
+ target: any;
1821
+ propertyName: string;
1822
+ onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
1823
+ isLinear?: boolean;
1824
+ icon?: string;
1825
+ lockObject?: LockObject;
1826
+ iconLabel?: string;
1827
+ onValueChange?: (value: string) => void;
1828
+ }
1829
+ export class Color3LineComponent extends React.Component<IColor3LineComponentProps> {
1830
+ render(): JSX.Element;
1831
+ }
1832
+
1833
+
1834
+ export interface IColor4LineComponentProps {
1835
+ label: string;
1836
+ target?: any;
1837
+ propertyName: string;
1838
+ onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
1839
+ onChange?: () => void;
1840
+ isLinear?: boolean;
1841
+ icon?: string;
1842
+ iconLabel?: string;
1843
+ lockObject?: LockObject;
1844
+ }
1845
+ export class Color4LineComponent extends React.Component<IColor4LineComponentProps> {
1846
+ render(): JSX.Element;
1847
+ }
1848
+
1849
+
1850
+ export interface IColorLineComponentProps {
1851
+ label: string;
1852
+ target?: any;
1853
+ propertyName: string;
1854
+ onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
1855
+ onChange?: () => void;
1856
+ isLinear?: boolean;
1857
+ icon?: string;
1858
+ iconLabel?: string;
1859
+ lockObject?: LockObject;
1860
+ disableAlpha?: boolean;
1861
+ }
1862
+ interface IColorLineComponentState {
1863
+ isExpanded: boolean;
1864
+ color: BABYLON.Color4;
1865
+ }
1866
+ export class ColorLineComponent extends React.Component<IColorLineComponentProps, IColorLineComponentState> {
1867
+ constructor(props: IColorLineComponentProps);
1868
+ shouldComponentUpdate(nextProps: IColorLineComponentProps, nextState: IColorLineComponentState): boolean;
1869
+ getValue(props?: Readonly<IColorLineComponentProps> & Readonly<{
1870
+ children?: React.ReactNode;
1871
+ }>): BABYLON.Color4;
1872
+ setColorFromString(colorString: string): void;
1873
+ setColor(newColor: BABYLON.Color4): void;
1874
+ switchExpandState(): void;
1875
+ updateStateR(value: number): void;
1876
+ updateStateG(value: number): void;
1877
+ updateStateB(value: number): void;
1878
+ updateStateA(value: number): void;
1879
+ copyToClipboard(): void;
1880
+ private _convertToColor;
1881
+ private _toColor3;
1882
+ render(): JSX.Element;
1883
+ }
1884
+
1885
+
1886
+ export interface IColorPickerComponentProps {
1887
+ value: BABYLON.Color4 | BABYLON.Color3;
1888
+ linearHint?: boolean;
1889
+ onColorChanged: (newOne: string) => void;
1890
+ icon?: string;
1891
+ iconLabel?: string;
1892
+ shouldPopRight?: boolean;
1893
+ }
1894
+ interface IColorPickerComponentState {
1895
+ pickerEnabled: boolean;
1896
+ color: BABYLON.Color3 | BABYLON.Color4;
1897
+ hex: string;
1898
+ }
1899
+ export class ColorPickerLineComponent extends React.Component<IColorPickerComponentProps, IColorPickerComponentState> {
1900
+ private _floatRef;
1901
+ private _floatHostRef;
1902
+ constructor(props: IColorPickerComponentProps);
1903
+ syncPositions(): void;
1904
+ shouldComponentUpdate(nextProps: IColorPickerComponentProps, nextState: IColorPickerComponentState): boolean;
1905
+ getHexString(props?: Readonly<IColorPickerComponentProps> & Readonly<{
1906
+ children?: React.ReactNode;
1907
+ }>): string;
1908
+ componentDidUpdate(): void;
1909
+ componentDidMount(): void;
1910
+ render(): JSX.Element;
1911
+ }
1912
+
1913
+
1914
+ export interface IButtonLineComponentProps {
1915
+ data: string;
1916
+ tooltip: string;
1917
+ }
1918
+ export class DraggableLineComponent extends React.Component<IButtonLineComponentProps> {
1919
+ constructor(props: IButtonLineComponentProps);
1920
+ render(): JSX.Element;
1921
+ }
1922
+
1923
+
1924
+ interface IFileButtonLineComponentProps {
1925
+ label: string;
1926
+ onClick: (file: File) => void;
1927
+ accept: string;
1928
+ icon?: string;
1929
+ iconLabel?: string;
1930
+ }
1931
+ export class FileButtonLineComponent extends React.Component<IFileButtonLineComponentProps> {
1932
+ private static _IDGenerator;
1933
+ private _id;
1934
+ private _uploadInputRef;
1935
+ constructor(props: IFileButtonLineComponentProps);
1936
+ onChange(evt: any): void;
1937
+ render(): JSX.Element;
1938
+ }
1939
+
1940
+
1941
+ interface IFileMultipleButtonLineComponentProps {
1942
+ label: string;
1943
+ onClick: (event: any) => void;
1944
+ accept: string;
1945
+ icon?: string;
1946
+ iconLabel?: string;
1947
+ }
1948
+ export class FileMultipleButtonLineComponent extends React.Component<IFileMultipleButtonLineComponentProps> {
1949
+ private static _IDGenerator;
1950
+ private _id;
1951
+ private _uploadInputRef;
1952
+ constructor(props: IFileMultipleButtonLineComponentProps);
1953
+ onChange(evt: any): void;
1954
+ render(): JSX.Element;
1955
+ }
1956
+
1957
+
1958
+ interface IFloatLineComponentProps {
1959
+ label: string;
1960
+ target: any;
1961
+ propertyName: string;
1962
+ lockObject?: LockObject;
1963
+ onChange?: (newValue: number) => void;
1964
+ isInteger?: boolean;
1965
+ onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
1966
+ additionalClass?: string;
1967
+ step?: string;
1968
+ digits?: number;
1969
+ useEuler?: boolean;
1970
+ min?: number;
1971
+ max?: number;
1972
+ smallUI?: boolean;
1973
+ onEnter?: (newValue: number) => void;
1974
+ icon?: string;
1975
+ iconLabel?: string;
1976
+ defaultValue?: number;
1977
+ arrows?: boolean;
1978
+ unit?: React.ReactNode;
1979
+ onDragStart?: (newValue: number) => void;
1980
+ onDragStop?: (newValue: number) => void;
1981
+ }
1982
+ export class FloatLineComponent extends React.Component<IFloatLineComponentProps, {
1983
+ value: string;
1984
+ dragging: boolean;
1985
+ }> {
1986
+ private _localChange;
1987
+ private _store;
1988
+ constructor(props: IFloatLineComponentProps);
1989
+ componentWillUnmount(): void;
1990
+ getValueString(value: any): string;
1991
+ shouldComponentUpdate(nextProps: IFloatLineComponentProps, nextState: {
1992
+ value: string;
1993
+ dragging: boolean;
1994
+ }): boolean;
1995
+ raiseOnPropertyChanged(newValue: number, previousValue: number): void;
1996
+ updateValue(valueString: string): void;
1997
+ lock(): void;
1998
+ unlock(): void;
1999
+ incrementValue(amount: number): void;
2000
+ onKeyDown(event: React.KeyboardEvent): void;
2001
+ render(): JSX.Element;
2002
+ }
2003
+
2004
+
2005
+ interface IHexLineComponentProps {
2006
+ label: string;
2007
+ target: any;
2008
+ propertyName: string;
2009
+ lockObject?: LockObject;
2010
+ onChange?: (newValue: number) => void;
2011
+ isInteger?: boolean;
2012
+ replaySourceReplacement?: string;
2013
+ onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
2014
+ additionalClass?: string;
2015
+ step?: string;
2016
+ digits?: number;
2017
+ useEuler?: boolean;
2018
+ min?: number;
2019
+ icon?: string;
2020
+ iconLabel?: string;
2021
+ }
2022
+ export class HexLineComponent extends React.Component<IHexLineComponentProps, {
2023
+ value: string;
2024
+ }> {
2025
+ private _localChange;
2026
+ private _store;
2027
+ private _propertyChange;
2028
+ constructor(props: IHexLineComponentProps);
2029
+ componentWillUnmount(): void;
2030
+ shouldComponentUpdate(nextProps: IHexLineComponentProps, nextState: {
2031
+ value: string;
2032
+ }): boolean;
2033
+ raiseOnPropertyChanged(newValue: number, previousValue: number): void;
2034
+ convertToHexString(valueString: string): string;
2035
+ updateValue(valueString: string, raisePropertyChanged: boolean): void;
2036
+ lock(): void;
2037
+ unlock(): void;
2038
+ render(): JSX.Element;
2039
+ }
2040
+
2041
+
2042
+ export interface IIconButtonLineComponentProps {
2043
+ icon: string;
2044
+ onClick: () => void;
2045
+ tooltip: string;
2046
+ active?: boolean;
2047
+ }
2048
+ export class IconButtonLineComponent extends React.Component<IIconButtonLineComponentProps> {
2049
+ constructor(props: IIconButtonLineComponentProps);
2050
+ render(): JSX.Element;
2051
+ }
2052
+
2053
+
2054
+ interface IIconComponentProps {
2055
+ icon: string;
2056
+ label?: string;
2057
+ }
2058
+ export class IconComponent extends React.Component<IIconComponentProps> {
2059
+ render(): JSX.Element;
2060
+ }
2061
+
2062
+
2063
+ interface IIndentedTextLineComponentProps {
2064
+ value?: string;
2065
+ color?: string;
2066
+ underline?: boolean;
2067
+ onLink?: () => void;
2068
+ url?: string;
2069
+ additionalClass?: string;
2070
+ }
2071
+ export class IndentedTextLineComponent extends React.Component<IIndentedTextLineComponentProps> {
2072
+ constructor(props: IIndentedTextLineComponentProps);
2073
+ onLink(): void;
2074
+ renderContent(): JSX.Element;
2075
+ render(): JSX.Element;
2076
+ }
2077
+
2078
+
2079
+ interface IInputArrowsComponentProps {
2080
+ incrementValue: (amount: number) => void;
2081
+ setDragging: (dragging: boolean) => void;
2082
+ }
2083
+ export class InputArrowsComponent extends React.Component<IInputArrowsComponentProps> {
2084
+ private _arrowsRef;
2085
+ private _drag;
2086
+ private _releaseListener;
2087
+ private _lockChangeListener;
2088
+ render(): JSX.Element;
2089
+ }
2090
+
2091
+
2092
+ export interface ISelectedLineContainer {
2093
+ selectedLineContainerTitles: Array<string>;
2094
+ selectedLineContainerTitlesNoFocus: Array<string>;
2095
+ }
2096
+
2097
+
2098
+ interface ILineContainerComponentProps {
2099
+ selection?: ISelectedLineContainer;
2100
+ title: string;
2101
+ children: any[] | any;
2102
+ closed?: boolean;
2103
+ }
2104
+ export class LineContainerComponent extends React.Component<ILineContainerComponentProps, {
2105
+ isExpanded: boolean;
2106
+ isHighlighted: boolean;
2107
+ }> {
2108
+ constructor(props: ILineContainerComponentProps);
2109
+ switchExpandedState(): void;
2110
+ renderHeader(): JSX.Element;
2111
+ componentDidMount(): void;
2112
+ render(): JSX.Element;
2113
+ }
2114
+
2115
+
2116
+ interface ILinkButtonComponentProps {
2117
+ label: string;
2118
+ buttonLabel: string;
2119
+ url?: string;
2120
+ onClick: () => void;
2121
+ icon?: any;
2122
+ onIconClick?: () => void;
2123
+ }
2124
+ export class LinkButtonComponent extends React.Component<ILinkButtonComponentProps> {
2125
+ constructor(props: ILinkButtonComponentProps);
2126
+ onLink(): void;
2127
+ render(): JSX.Element;
2128
+ }
2129
+
2130
+
2131
+ interface IMessageLineComponentProps {
2132
+ text: string;
2133
+ color?: string;
2134
+ icon?: any;
2135
+ }
2136
+ export class MessageLineComponent extends React.Component<IMessageLineComponentProps> {
2137
+ constructor(props: IMessageLineComponentProps);
2138
+ render(): JSX.Element;
2139
+ }
2140
+
2141
+
2142
+ interface INumericInputComponentProps {
2143
+ label: string;
2144
+ value: number;
2145
+ step?: number;
2146
+ onChange: (value: number) => void;
2147
+ precision?: number;
2148
+ icon?: string;
2149
+ iconLabel?: string;
2150
+ }
2151
+ export class NumericInputComponent extends React.Component<INumericInputComponentProps, {
2152
+ value: string;
2153
+ }> {
2154
+ static defaultProps: {
2155
+ step: number;
2156
+ };
2157
+ private _localChange;
2158
+ constructor(props: INumericInputComponentProps);
2159
+ shouldComponentUpdate(nextProps: INumericInputComponentProps, nextState: {
2160
+ value: string;
2161
+ }): boolean;
2162
+ updateValue(evt: any): void;
2163
+ onBlur(): void;
2164
+ render(): JSX.Element;
2165
+ }
2166
+
2167
+
2168
+ export var Null_Value: number;
2169
+ export interface IOptionsLineComponentProps {
2170
+ label: string;
2171
+ target: any;
2172
+ propertyName: string;
2173
+ options: BABYLON.IInspectableOptions[];
2174
+ noDirectUpdate?: boolean;
2175
+ onSelect?: (value: number) => void;
2176
+ extractValue?: () => number;
2177
+ onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
2178
+ allowNullValue?: boolean;
2179
+ icon?: string;
2180
+ iconLabel?: string;
2181
+ }
2182
+ export class OptionsLineComponent extends React.Component<IOptionsLineComponentProps, {
2183
+ value: number;
2184
+ }> {
2185
+ private _localChange;
2186
+ private _remapValueIn;
2187
+ private _remapValueOut;
2188
+ constructor(props: IOptionsLineComponentProps);
2189
+ shouldComponentUpdate(nextProps: IOptionsLineComponentProps, nextState: {
2190
+ value: number;
2191
+ }): boolean;
2192
+ raiseOnPropertyChanged(newValue: number, previousValue: number): void;
2193
+ updateValue(valueString: string): void;
2194
+ render(): JSX.Element;
2195
+ }
2196
+
2197
+
2198
+ export class Popup {
2199
+ static CreatePopup(title: string, windowVariableName: string, width?: number, height?: number): HTMLDivElement | null;
2200
+ private static _CopyStyles;
2201
+ }
2202
+
2203
+
2204
+ interface IRadioButtonLineComponentProps {
2205
+ onSelectionChangedObservable: BABYLON.Observable<RadioButtonLineComponent>;
2206
+ label: string;
2207
+ isSelected: () => boolean;
2208
+ onSelect: () => void;
2209
+ icon?: string;
2210
+ iconLabel?: string;
2211
+ }
2212
+ export class RadioButtonLineComponent extends React.Component<IRadioButtonLineComponentProps, {
2213
+ isSelected: boolean;
2214
+ }> {
2215
+ private _onSelectionChangedObserver;
2216
+ constructor(props: IRadioButtonLineComponentProps);
2217
+ componentDidMount(): void;
2218
+ componentWillUnmount(): void;
2219
+ onChange(): void;
2220
+ render(): JSX.Element;
2221
+ }
2222
+
2223
+
2224
+ interface ISliderLineComponentProps {
2225
+ label: string;
2226
+ target?: any;
2227
+ propertyName?: string;
2228
+ minimum: number;
2229
+ maximum: number;
2230
+ step: number;
2231
+ directValue?: number;
2232
+ useEuler?: boolean;
2233
+ onChange?: (value: number) => void;
2234
+ onInput?: (value: number) => void;
2235
+ onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
2236
+ decimalCount?: number;
2237
+ margin?: boolean;
2238
+ icon?: string;
2239
+ iconLabel?: string;
2240
+ lockObject?: LockObject;
2241
+ unit?: React.ReactNode;
2242
+ }
2243
+ export class SliderLineComponent extends React.Component<ISliderLineComponentProps, {
2244
+ value: number;
2245
+ }> {
2246
+ private _localChange;
2247
+ constructor(props: ISliderLineComponentProps);
2248
+ shouldComponentUpdate(nextProps: ISliderLineComponentProps, nextState: {
2249
+ value: number;
2250
+ }): boolean;
2251
+ onChange(newValueString: any): void;
2252
+ onInput(newValueString: any): void;
2253
+ prepareDataToRead(value: number): number;
2254
+ render(): JSX.Element;
2255
+ }
2256
+
2257
+
2258
+ export const conflictingValuesPlaceholder = "\u2014";
2259
+ /**
2260
+ *
2261
+ * @param targets a list of selected targets
2262
+ * @param onPropertyChangedObservable
2263
+ * @param getProperty
2264
+ * @returns a proxy object that can be passed as a target into the input
2265
+ */
2266
+ export function makeTargetsProxy<Type>(targets: Type[], onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>, getProperty?: (target: Type, property: keyof Type) => any): any;
2267
+
2268
+
2269
+ export interface ITextInputLineComponentProps {
2270
+ label?: string;
2271
+ lockObject?: LockObject;
2272
+ target?: any;
2273
+ propertyName?: string;
2274
+ value?: string;
2275
+ onChange?: (value: string) => void;
2276
+ onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
2277
+ icon?: string;
2278
+ iconLabel?: string;
2279
+ noUnderline?: boolean;
2280
+ numbersOnly?: boolean;
2281
+ delayInput?: boolean;
2282
+ arrows?: boolean;
2283
+ arrowsIncrement?: (amount: number) => void;
2284
+ step?: number;
2285
+ numeric?: boolean;
2286
+ roundValues?: boolean;
2287
+ min?: number;
2288
+ max?: number;
2289
+ placeholder?: string;
2290
+ unit?: React.ReactNode;
2291
+ }
2292
+ export class TextInputLineComponent extends React.Component<ITextInputLineComponentProps, {
2293
+ value: string;
2294
+ dragging: boolean;
2295
+ }> {
2296
+ private _localChange;
2297
+ constructor(props: ITextInputLineComponentProps);
2298
+ componentWillUnmount(): void;
2299
+ shouldComponentUpdate(nextProps: ITextInputLineComponentProps, nextState: {
2300
+ value: string;
2301
+ dragging: boolean;
2302
+ }): boolean;
2303
+ raiseOnPropertyChanged(newValue: string, previousValue: string): void;
2304
+ getCurrentNumericValue(value: string): number;
2305
+ updateValue(value: string): void;
2306
+ incrementValue(amount: number): void;
2307
+ onKeyDown(event: React.KeyboardEvent): void;
2308
+ render(): JSX.Element;
2309
+ }
2310
+
2311
+
2312
+ interface ITextLineComponentProps {
2313
+ label?: string;
2314
+ value?: string;
2315
+ color?: string;
2316
+ underline?: boolean;
2317
+ onLink?: () => void;
2318
+ url?: string;
2319
+ ignoreValue?: boolean;
2320
+ additionalClass?: string;
2321
+ icon?: string;
2322
+ iconLabel?: string;
2323
+ tooltip?: string;
2324
+ }
2325
+ export class TextLineComponent extends React.Component<ITextLineComponentProps> {
2326
+ constructor(props: ITextLineComponentProps);
2327
+ onLink(): void;
2328
+ renderContent(): JSX.Element | null;
2329
+ render(): JSX.Element;
2330
+ }
2331
+
2332
+
2333
+ /// <reference types="react" />
2334
+ interface IUnitButtonProps {
2335
+ unit: string;
2336
+ locked?: boolean;
2337
+ onClick?: (unit: string) => void;
2338
+ }
2339
+ export function UnitButton(props: IUnitButtonProps): JSX.Element;
2340
+
2341
+
2342
+ interface IValueLineComponentProps {
2343
+ label: string;
2344
+ value: number;
2345
+ color?: string;
2346
+ fractionDigits?: number;
2347
+ units?: string;
2348
+ icon?: string;
2349
+ iconLabel?: string;
2350
+ }
2351
+ export class ValueLineComponent extends React.Component<IValueLineComponentProps> {
2352
+ constructor(props: IValueLineComponentProps);
2353
+ render(): JSX.Element;
2354
+ }
2355
+
2356
+
2357
+ interface IVector2LineComponentProps {
2358
+ label: string;
2359
+ target: any;
2360
+ propertyName: string;
2361
+ step?: number;
2362
+ onChange?: (newvalue: BABYLON.Vector2) => void;
2363
+ onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
2364
+ icon?: string;
2365
+ iconLabel?: string;
2366
+ }
2367
+ export class Vector2LineComponent extends React.Component<IVector2LineComponentProps, {
2368
+ isExpanded: boolean;
2369
+ value: BABYLON.Vector2;
2370
+ }> {
2371
+ static defaultProps: {
2372
+ step: number;
2373
+ };
2374
+ private _localChange;
2375
+ constructor(props: IVector2LineComponentProps);
2376
+ shouldComponentUpdate(nextProps: IVector2LineComponentProps, nextState: {
2377
+ isExpanded: boolean;
2378
+ value: BABYLON.Vector2;
2379
+ }): boolean;
2380
+ switchExpandState(): void;
2381
+ raiseOnPropertyChanged(previousValue: BABYLON.Vector2): void;
2382
+ updateStateX(value: number): void;
2383
+ updateStateY(value: number): void;
2384
+ render(): JSX.Element;
2385
+ }
2386
+
2387
+
2388
+ interface IVector3LineComponentProps {
2389
+ label: string;
2390
+ target: any;
2391
+ propertyName: string;
2392
+ step?: number;
2393
+ onChange?: (newvalue: BABYLON.Vector3) => void;
2394
+ useEuler?: boolean;
2395
+ onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
2396
+ noSlider?: boolean;
2397
+ icon?: string;
2398
+ iconLabel?: string;
2399
+ }
2400
+ export class Vector3LineComponent extends React.Component<IVector3LineComponentProps, {
2401
+ isExpanded: boolean;
2402
+ value: BABYLON.Vector3;
2403
+ }> {
2404
+ static defaultProps: {
2405
+ step: number;
2406
+ };
2407
+ private _localChange;
2408
+ constructor(props: IVector3LineComponentProps);
2409
+ getCurrentValue(): any;
2410
+ shouldComponentUpdate(nextProps: IVector3LineComponentProps, nextState: {
2411
+ isExpanded: boolean;
2412
+ value: BABYLON.Vector3;
2413
+ }): boolean;
2414
+ switchExpandState(): void;
2415
+ raiseOnPropertyChanged(previousValue: BABYLON.Vector3): void;
2416
+ updateVector3(): void;
2417
+ updateStateX(value: number): void;
2418
+ updateStateY(value: number): void;
2419
+ updateStateZ(value: number): void;
2420
+ render(): JSX.Element;
2421
+ }
2422
+
2423
+
2424
+ interface IVector4LineComponentProps {
2425
+ label: string;
2426
+ target: any;
2427
+ propertyName: string;
2428
+ step?: number;
2429
+ onChange?: (newvalue: BABYLON.Vector4) => void;
2430
+ useEuler?: boolean;
2431
+ onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
2432
+ icon?: string;
2433
+ iconLabel?: string;
2434
+ }
2435
+ export class Vector4LineComponent extends React.Component<IVector4LineComponentProps, {
2436
+ isExpanded: boolean;
2437
+ value: BABYLON.Vector4;
2438
+ }> {
2439
+ static defaultProps: {
2440
+ step: number;
2441
+ };
2442
+ private _localChange;
2443
+ constructor(props: IVector4LineComponentProps);
2444
+ getCurrentValue(): any;
2445
+ shouldComponentUpdate(nextProps: IVector4LineComponentProps, nextState: {
2446
+ isExpanded: boolean;
2447
+ value: BABYLON.Vector4;
2448
+ }): boolean;
2449
+ switchExpandState(): void;
2450
+ raiseOnPropertyChanged(previousValue: BABYLON.Vector4): void;
2451
+ updateVector4(): void;
2452
+ updateStateX(value: number): void;
2453
+ updateStateY(value: number): void;
2454
+ updateStateZ(value: number): void;
2455
+ updateStateW(value: number): void;
2456
+ render(): JSX.Element;
2457
+ }
2458
+
2459
+
2460
+ export class PropertyChangedEvent {
2461
+ object: any;
2462
+ property: string;
2463
+ value: any;
2464
+ initialValue: any;
2465
+ allowNullValue?: boolean;
2466
+ }
2467
+
2468
+
2469
+ export class StringTools {
2470
+ private static _SaveAs;
2471
+ private static _Click;
2472
+ /**
2473
+ * Download a string into a file that will be saved locally by the browser
2474
+ * @param document
2475
+ * @param content defines the string to download locally as a file
2476
+ * @param filename
2477
+ */
2478
+ static DownloadAsFile(document: HTMLDocument, content: string, filename: string): void;
2479
+ }
2480
+
2481
+
2482
+ interface ICheckboxPropertyGridComponentProps {
2483
+ checkbox: BABYLON.GUI.Checkbox;
2484
+ lockObject: LockObject;
2485
+ onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
2486
+ }
2487
+ export class CheckboxPropertyGridComponent extends React.Component<ICheckboxPropertyGridComponentProps> {
2488
+ constructor(props: ICheckboxPropertyGridComponentProps);
2489
+ render(): JSX.Element;
2490
+ }
2491
+
2492
+
2493
+ interface IColorPickerPropertyGridComponentProps {
2494
+ colorPicker: BABYLON.GUI.ColorPicker;
2495
+ lockObject: LockObject;
2496
+ onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
2497
+ }
2498
+ export class ColorPickerPropertyGridComponent extends React.Component<IColorPickerPropertyGridComponentProps> {
2499
+ constructor(props: IColorPickerPropertyGridComponentProps);
2500
+ render(): JSX.Element;
2501
+ }
2502
+
2503
+
2504
+ interface ICommonControlPropertyGridComponentProps {
2505
+ controls?: BABYLON.GUI.Control[];
2506
+ control?: BABYLON.GUI.Control;
2507
+ lockObject: LockObject;
2508
+ onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
2509
+ }
2510
+ export class CommonControlPropertyGridComponent extends React.Component<ICommonControlPropertyGridComponentProps> {
2511
+ constructor(props: ICommonControlPropertyGridComponentProps);
2512
+ renderGridInformation(control: BABYLON.GUI.Control): JSX.Element | null;
2513
+ render(): JSX.Element | undefined;
2514
+ }
2515
+
2516
+
2517
+ interface IControlPropertyGridComponentProps {
2518
+ control: BABYLON.GUI.Control;
2519
+ lockObject: LockObject;
2520
+ onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
2521
+ }
2522
+ export class ControlPropertyGridComponent extends React.Component<IControlPropertyGridComponentProps> {
2523
+ constructor(props: IControlPropertyGridComponentProps);
2524
+ render(): JSX.Element;
2525
+ }
2526
+
2527
+
2528
+ interface IEllipsePropertyGridComponentProps {
2529
+ ellipse: BABYLON.GUI.Ellipse;
2530
+ lockObject: LockObject;
2531
+ onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
2532
+ }
2533
+ export class EllipsePropertyGridComponent extends React.Component<IEllipsePropertyGridComponentProps> {
2534
+ constructor(props: IEllipsePropertyGridComponentProps);
2535
+ render(): JSX.Element;
2536
+ }
2537
+
2538
+
2539
+ interface IGridPropertyGridComponentProps {
2540
+ grid: BABYLON.GUI.Grid;
2541
+ lockObject: LockObject;
2542
+ onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
2543
+ }
2544
+ export class GridPropertyGridComponent extends React.Component<IGridPropertyGridComponentProps> {
2545
+ constructor(props: IGridPropertyGridComponentProps);
2546
+ renderRows(): JSX.Element[];
2547
+ renderColumns(): JSX.Element[];
2548
+ render(): JSX.Element;
2549
+ }
2550
+
2551
+
2552
+ interface IImageBasedSliderPropertyGridComponentProps {
2553
+ imageBasedSlider: BABYLON.GUI.ImageBasedSlider;
2554
+ lockObject: LockObject;
2555
+ onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
2556
+ }
2557
+ export class ImageBasedSliderPropertyGridComponent extends React.Component<IImageBasedSliderPropertyGridComponentProps> {
2558
+ constructor(props: IImageBasedSliderPropertyGridComponentProps);
2559
+ render(): JSX.Element;
2560
+ }
2561
+
2562
+
2563
+ interface IImagePropertyGridComponentProps {
2564
+ image: BABYLON.GUI.Image;
2565
+ lockObject: LockObject;
2566
+ onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
2567
+ }
2568
+ export class ImagePropertyGridComponent extends React.Component<IImagePropertyGridComponentProps> {
2569
+ constructor(props: IImagePropertyGridComponentProps);
2570
+ render(): JSX.Element;
2571
+ }
2572
+
2573
+
2574
+ interface IInputTextPropertyGridComponentProps {
2575
+ inputText: BABYLON.GUI.InputText;
2576
+ lockObject: LockObject;
2577
+ onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
2578
+ }
2579
+ export class InputTextPropertyGridComponent extends React.Component<IInputTextPropertyGridComponentProps> {
2580
+ constructor(props: IInputTextPropertyGridComponentProps);
2581
+ render(): JSX.Element;
2582
+ }
2583
+
2584
+
2585
+ interface ILinePropertyGridComponentProps {
2586
+ line: BABYLON.GUI.Line;
2587
+ lockObject: LockObject;
2588
+ onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
2589
+ }
2590
+ export class LinePropertyGridComponent extends React.Component<ILinePropertyGridComponentProps> {
2591
+ constructor(props: ILinePropertyGridComponentProps);
2592
+ onDashChange(value: string): void;
2593
+ render(): JSX.Element;
2594
+ }
2595
+
2596
+
2597
+ interface IRadioButtonPropertyGridComponentProps {
2598
+ radioButtons: BABYLON.GUI.RadioButton[];
2599
+ lockObject: LockObject;
2600
+ onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
2601
+ }
2602
+ export class RadioButtonPropertyGridComponent extends React.Component<IRadioButtonPropertyGridComponentProps> {
2603
+ constructor(props: IRadioButtonPropertyGridComponentProps);
2604
+ render(): JSX.Element;
2605
+ }
2606
+
2607
+
2608
+ interface IRectanglePropertyGridComponentProps {
2609
+ rectangle: BABYLON.GUI.Rectangle;
2610
+ lockObject: LockObject;
2611
+ onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
2612
+ }
2613
+ export class RectanglePropertyGridComponent extends React.Component<IRectanglePropertyGridComponentProps> {
2614
+ constructor(props: IRectanglePropertyGridComponentProps);
2615
+ render(): JSX.Element;
2616
+ }
2617
+
2618
+
2619
+ interface IScrollViewerPropertyGridComponentProps {
2620
+ scrollViewer: BABYLON.GUI.ScrollViewer;
2621
+ lockObject: LockObject;
2622
+ onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
2623
+ }
2624
+ export class ScrollViewerPropertyGridComponent extends React.Component<IScrollViewerPropertyGridComponentProps> {
2625
+ constructor(props: IScrollViewerPropertyGridComponentProps);
2626
+ render(): JSX.Element;
2627
+ }
2628
+
2629
+
2630
+ interface ISliderPropertyGridComponentProps {
2631
+ slider: BABYLON.GUI.Slider;
2632
+ lockObject: LockObject;
2633
+ onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
2634
+ }
2635
+ export class SliderPropertyGridComponent extends React.Component<ISliderPropertyGridComponentProps> {
2636
+ constructor(props: ISliderPropertyGridComponentProps);
2637
+ render(): JSX.Element;
2638
+ }
2639
+
2640
+
2641
+ interface IStackPanelPropertyGridComponentProps {
2642
+ stackPanel: BABYLON.GUI.StackPanel;
2643
+ lockObject: LockObject;
2644
+ onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
2645
+ }
2646
+ export class StackPanelPropertyGridComponent extends React.Component<IStackPanelPropertyGridComponentProps> {
2647
+ constructor(props: IStackPanelPropertyGridComponentProps);
2648
+ render(): JSX.Element;
2649
+ }
2650
+
2651
+
2652
+ interface ITextBlockPropertyGridComponentProps {
2653
+ textBlock: BABYLON.GUI.TextBlock;
2654
+ lockObject: LockObject;
2655
+ onPropertyChangedObservable?: BABYLON.Observable<PropertyChangedEvent>;
2656
+ }
2657
+ export class TextBlockPropertyGridComponent extends React.Component<ITextBlockPropertyGridComponentProps> {
2658
+ constructor(props: ITextBlockPropertyGridComponentProps);
2659
+ render(): JSX.Element;
2660
+ }
2661
+
2662
+
2663
+ /**
2664
+ * Class used to provide lock mechanism
2665
+ */
2666
+ export class LockObject {
2667
+ /**
2668
+ * Gets or set if the lock is engaged
2669
+ */
2670
+ lock: boolean;
2671
+ }
2672
+
2673
+
2674
+
2675
+ }
2676
+
2677
+
2678
+