@babylonjs/node-editor 5.13.3 → 5.15.0
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.
|
@@ -161,6 +161,8 @@ export class PreviewAreaComponent extends React.Component<IPreviewAreaComponentP
|
|
|
161
161
|
componentWillUnmount(): void;
|
|
162
162
|
changeBackFaceCulling(value: boolean): void;
|
|
163
163
|
changeDepthPrePass(value: boolean): void;
|
|
164
|
+
_onPointerOverCanvas: () => void;
|
|
165
|
+
_onPointerOutCanvas: () => void;
|
|
164
166
|
changeParticleSystemBlendMode(newOne: number): void;
|
|
165
167
|
render(): JSX.Element;
|
|
166
168
|
}
|
|
@@ -252,9 +254,11 @@ import * as React from "react";
|
|
|
252
254
|
import { GlobalState } from "@babylonjs/node-editor/globalState";
|
|
253
255
|
import { InputBlock } from "@babylonjs/core/Materials/Node/Blocks/Input/inputBlock";
|
|
254
256
|
import "@babylonjs/node-editor/components/propertyTab/propertyTab.scss";
|
|
257
|
+
import { LockObject } from "@babylonjs/node-editor/tabs/propertyGrids/lockObject";
|
|
255
258
|
interface IInputsPropertyTabComponentProps {
|
|
256
259
|
globalState: GlobalState;
|
|
257
260
|
inputs: InputBlock[];
|
|
261
|
+
lockObject: LockObject;
|
|
258
262
|
}
|
|
259
263
|
export class InputsPropertyTabComponent extends React.Component<IInputsPropertyTabComponentProps> {
|
|
260
264
|
constructor(props: IInputsPropertyTabComponentProps);
|
|
@@ -269,9 +273,11 @@ declare module "@babylonjs/node-editor/components/propertyTab/properties/color3P
|
|
|
269
273
|
import * as React from "react";
|
|
270
274
|
import { GlobalState } from "@babylonjs/node-editor/globalState";
|
|
271
275
|
import { InputBlock } from "@babylonjs/core/Materials/Node/Blocks/Input/inputBlock";
|
|
276
|
+
import { LockObject } from "@babylonjs/node-editor/tabs/propertyGrids/lockObject";
|
|
272
277
|
interface IColor3PropertyTabComponentProps {
|
|
273
278
|
globalState: GlobalState;
|
|
274
279
|
inputBlock: InputBlock;
|
|
280
|
+
lockObject: LockObject;
|
|
275
281
|
}
|
|
276
282
|
export class Color3PropertyTabComponent extends React.Component<IColor3PropertyTabComponentProps> {
|
|
277
283
|
render(): JSX.Element;
|
|
@@ -283,9 +289,11 @@ declare module "@babylonjs/node-editor/components/propertyTab/properties/color4P
|
|
|
283
289
|
import * as React from "react";
|
|
284
290
|
import { GlobalState } from "@babylonjs/node-editor/globalState";
|
|
285
291
|
import { InputBlock } from "@babylonjs/core/Materials/Node/Blocks/Input/inputBlock";
|
|
292
|
+
import { LockObject } from "@babylonjs/node-editor/tabs/propertyGrids/lockObject";
|
|
286
293
|
interface IColor4PropertyTabComponentProps {
|
|
287
294
|
globalState: GlobalState;
|
|
288
295
|
inputBlock: InputBlock;
|
|
296
|
+
lockObject: LockObject;
|
|
289
297
|
}
|
|
290
298
|
export class Color4PropertyTabComponent extends React.Component<IColor4PropertyTabComponentProps> {
|
|
291
299
|
render(): JSX.Element;
|
|
@@ -311,9 +319,11 @@ declare module "@babylonjs/node-editor/components/propertyTab/properties/matrixP
|
|
|
311
319
|
import * as React from "react";
|
|
312
320
|
import { GlobalState } from "@babylonjs/node-editor/globalState";
|
|
313
321
|
import { InputBlock } from "@babylonjs/core/Materials/Node/Blocks/Input/inputBlock";
|
|
322
|
+
import { LockObject } from "@babylonjs/node-editor/tabs/propertyGrids/lockObject";
|
|
314
323
|
interface IMatrixPropertyTabComponentProps {
|
|
315
324
|
globalState: GlobalState;
|
|
316
325
|
inputBlock: InputBlock;
|
|
326
|
+
lockObject: LockObject;
|
|
317
327
|
}
|
|
318
328
|
export class MatrixPropertyTabComponent extends React.Component<IMatrixPropertyTabComponentProps> {
|
|
319
329
|
render(): JSX.Element;
|
|
@@ -325,9 +335,11 @@ declare module "@babylonjs/node-editor/components/propertyTab/properties/vector2
|
|
|
325
335
|
import * as React from "react";
|
|
326
336
|
import { GlobalState } from "@babylonjs/node-editor/globalState";
|
|
327
337
|
import { InputBlock } from "@babylonjs/core/Materials/Node/Blocks/Input/inputBlock";
|
|
338
|
+
import { LockObject } from "@babylonjs/node-editor/tabs/propertyGrids/lockObject";
|
|
328
339
|
interface IVector2PropertyTabComponentProps {
|
|
329
340
|
globalState: GlobalState;
|
|
330
341
|
inputBlock: InputBlock;
|
|
342
|
+
lockObject: LockObject;
|
|
331
343
|
}
|
|
332
344
|
export class Vector2PropertyTabComponent extends React.Component<IVector2PropertyTabComponentProps> {
|
|
333
345
|
render(): JSX.Element;
|
|
@@ -339,9 +351,11 @@ declare module "@babylonjs/node-editor/components/propertyTab/properties/vector3
|
|
|
339
351
|
import * as React from "react";
|
|
340
352
|
import { GlobalState } from "@babylonjs/node-editor/globalState";
|
|
341
353
|
import { InputBlock } from "@babylonjs/core/Materials/Node/Blocks/Input/inputBlock";
|
|
354
|
+
import { LockObject } from "@babylonjs/node-editor/tabs/propertyGrids/lockObject";
|
|
342
355
|
interface IVector3PropertyTabComponentProps {
|
|
343
356
|
globalState: GlobalState;
|
|
344
357
|
inputBlock: InputBlock;
|
|
358
|
+
lockObject: LockObject;
|
|
345
359
|
}
|
|
346
360
|
export class Vector3PropertyTabComponent extends React.Component<IVector3PropertyTabComponentProps> {
|
|
347
361
|
render(): JSX.Element;
|
|
@@ -353,9 +367,11 @@ declare module "@babylonjs/node-editor/components/propertyTab/properties/vector4
|
|
|
353
367
|
import * as React from "react";
|
|
354
368
|
import { GlobalState } from "@babylonjs/node-editor/globalState";
|
|
355
369
|
import { InputBlock } from "@babylonjs/core/Materials/Node/Blocks/Input/inputBlock";
|
|
370
|
+
import { LockObject } from "@babylonjs/node-editor/tabs/propertyGrids/lockObject";
|
|
356
371
|
interface IVector4PropertyTabComponentProps {
|
|
357
372
|
globalState: GlobalState;
|
|
358
373
|
inputBlock: InputBlock;
|
|
374
|
+
lockObject: LockObject;
|
|
359
375
|
}
|
|
360
376
|
export class Vector4PropertyTabComponent extends React.Component<IVector4PropertyTabComponentProps> {
|
|
361
377
|
render(): JSX.Element;
|
|
@@ -373,8 +389,10 @@ import { GraphNode } from "@babylonjs/node-editor/nodeGraphSystem/graphNode";
|
|
|
373
389
|
import { GraphFrame } from "@babylonjs/node-editor/nodeGraphSystem/graphFrame";
|
|
374
390
|
import { NodePort } from "@babylonjs/node-editor/nodeGraphSystem/nodePort";
|
|
375
391
|
import { FrameNodePort } from "@babylonjs/node-editor/nodeGraphSystem/frameNodePort";
|
|
392
|
+
import { LockObject } from "@babylonjs/node-editor/tabs/propertyGrids/lockObject";
|
|
376
393
|
interface IPropertyTabComponentProps {
|
|
377
394
|
globalState: GlobalState;
|
|
395
|
+
lockObject: LockObject;
|
|
378
396
|
}
|
|
379
397
|
interface IPropertyTabComponentState {
|
|
380
398
|
currentNode: Nullable<GraphNode>;
|
|
@@ -451,6 +469,7 @@ export class GlobalState {
|
|
|
451
469
|
directionalLight1: boolean;
|
|
452
470
|
controlCamera: boolean;
|
|
453
471
|
_mode: NodeMaterialModes;
|
|
472
|
+
pointerOverCanvas: boolean;
|
|
454
473
|
/** Gets the mode */
|
|
455
474
|
get mode(): NodeMaterialModes;
|
|
456
475
|
/** Sets the mode */
|
|
@@ -488,7 +507,6 @@ interface IInternalPreviewAreaOptions extends IInspectorOptions {
|
|
|
488
507
|
embedHostWidth?: string;
|
|
489
508
|
}
|
|
490
509
|
export class GraphEditor extends React.Component<IGraphEditorProps, IGraphEditorState> {
|
|
491
|
-
static readonly NodeWidth: number;
|
|
492
510
|
private _graphCanvasRef;
|
|
493
511
|
private _diagramContainerRef;
|
|
494
512
|
private _graphCanvas;
|
|
@@ -498,8 +516,6 @@ export class GraphEditor extends React.Component<IGraphEditorProps, IGraphEditor
|
|
|
498
516
|
private _leftWidth;
|
|
499
517
|
private _rightWidth;
|
|
500
518
|
private _previewManager;
|
|
501
|
-
private _copiedNodes;
|
|
502
|
-
private _copiedFrames;
|
|
503
519
|
private _mouseLocationX;
|
|
504
520
|
private _mouseLocationY;
|
|
505
521
|
private _onWidgetKeyUpPointer;
|
|
@@ -510,8 +526,6 @@ export class GraphEditor extends React.Component<IGraphEditorProps, IGraphEditor
|
|
|
510
526
|
componentDidMount(): void;
|
|
511
527
|
componentWillUnmount(): void;
|
|
512
528
|
constructor(props: IGraphEditorProps);
|
|
513
|
-
reconnectNewNodes(nodeIndex: number, newNodes: GraphNode[], sourceNodes: GraphNode[], done: boolean[]): void;
|
|
514
|
-
pasteSelection(copiedNodes: GraphNode[], currentX: number, currentY: number, selectNew?: boolean): GraphNode[] | undefined;
|
|
515
529
|
zoomToFit(): void;
|
|
516
530
|
buildMaterial(autoConfigure?: boolean): void;
|
|
517
531
|
build(ignoreEditorData?: boolean): void;
|
|
@@ -521,7 +535,7 @@ export class GraphEditor extends React.Component<IGraphEditorProps, IGraphEditor
|
|
|
521
535
|
reOrganize(editorData?: Nullable<IEditorData>, isImportingAFrame?: boolean): void;
|
|
522
536
|
onPointerDown(evt: React.PointerEvent<HTMLDivElement>): void;
|
|
523
537
|
onPointerUp(evt: React.PointerEvent<HTMLDivElement>): void;
|
|
524
|
-
onWheel
|
|
538
|
+
onWheel: (evt: WheelEvent) => void;
|
|
525
539
|
resizeColumns(evt: React.PointerEvent<HTMLDivElement>, forLeft?: boolean): void;
|
|
526
540
|
buildColumnLayout(): string;
|
|
527
541
|
emitNewBlock(blockType: string, targetX: number, targetY: number): void;
|
|
@@ -558,7 +572,7 @@ export class BlockNodeData implements INodeData {
|
|
|
558
572
|
set comments(value: string);
|
|
559
573
|
getPortByName(name: string): IPortData | null;
|
|
560
574
|
dispose(): void;
|
|
561
|
-
|
|
575
|
+
prepareHeaderIcon(iconDiv: HTMLDivElement, img: HTMLImageElement): void;
|
|
562
576
|
constructor(data: NodeMaterialBlock, nodeContainer: INodeContainer);
|
|
563
577
|
}
|
|
564
578
|
|
|
@@ -592,6 +606,7 @@ export class ConnectionPointPortData implements IPortData {
|
|
|
592
606
|
constructor(connectionPoint: NodeMaterialConnectionPoint, nodeContainer: INodeContainer);
|
|
593
607
|
updateDisplayName(newName: string): void;
|
|
594
608
|
connectTo(port: IPortData): void;
|
|
609
|
+
canConnectTo(port: IPortData): boolean;
|
|
595
610
|
disconnectFrom(port: IPortData): void;
|
|
596
611
|
checkCompatibilityState(port: IPortData): 0 | NodeMaterialConnectionPointCompatibilityStates.TypeIncompatible | NodeMaterialConnectionPointCompatibilityStates.TargetIncompatible | NodeMaterialConnectionPointCompatibilityStates.HierarchyIssue;
|
|
597
612
|
getCompatibilityIssueMessage(issue: number, targetNode: GraphNode, targetPort: IPortData): "" | "Cannot connect two different connection types" | "Source block can only work in fragment shader whereas destination block is currently aimed for the vertex shader" | "Source block cannot be connected with one of its ancestors";
|
|
@@ -1109,7 +1124,7 @@ export class SerializationTools {
|
|
|
1109
1124
|
declare module "@babylonjs/node-editor/sharedComponents/checkBoxLineComponent" {
|
|
1110
1125
|
import * as React from "react";
|
|
1111
1126
|
import { Observable } from "@babylonjs/core/Misc/observable";
|
|
1112
|
-
import { PropertyChangedEvent } from "@babylonjs/node-editor/
|
|
1127
|
+
import { PropertyChangedEvent } from "@babylonjs/node-editor/propertyChangedEvent";
|
|
1113
1128
|
export interface ICheckBoxLineComponentProps {
|
|
1114
1129
|
label: string;
|
|
1115
1130
|
target?: any;
|
|
@@ -1136,34 +1151,6 @@ export class CheckBoxLineComponent extends React.Component<ICheckBoxLineComponen
|
|
|
1136
1151
|
render(): JSX.Element;
|
|
1137
1152
|
}
|
|
1138
1153
|
|
|
1139
|
-
}
|
|
1140
|
-
declare module "@babylonjs/node-editor/sharedComponents/colorPickerComponent" {
|
|
1141
|
-
import * as React from "react";
|
|
1142
|
-
import { Color4, Color3 } from "@babylonjs/core/Maths/math.color";
|
|
1143
|
-
import { GlobalState } from "@babylonjs/node-editor/globalState";
|
|
1144
|
-
export interface IColorPickerComponentProps {
|
|
1145
|
-
value: Color4 | Color3;
|
|
1146
|
-
onColorChanged: (newOne: string) => void;
|
|
1147
|
-
globalState: GlobalState;
|
|
1148
|
-
}
|
|
1149
|
-
interface IColorPickerComponentState {
|
|
1150
|
-
pickerEnabled: boolean;
|
|
1151
|
-
color: Color3 | Color4;
|
|
1152
|
-
hex: string;
|
|
1153
|
-
}
|
|
1154
|
-
export class ColorPickerLineComponent extends React.Component<IColorPickerComponentProps, IColorPickerComponentState> {
|
|
1155
|
-
private _floatRef;
|
|
1156
|
-
private _floatHostRef;
|
|
1157
|
-
constructor(props: IColorPickerComponentProps);
|
|
1158
|
-
syncPositions(): void;
|
|
1159
|
-
shouldComponentUpdate(nextProps: IColorPickerComponentProps, nextState: IColorPickerComponentState): boolean;
|
|
1160
|
-
componentDidUpdate(): void;
|
|
1161
|
-
componentDidMount(): void;
|
|
1162
|
-
setPickerState(enabled: boolean): void;
|
|
1163
|
-
render(): JSX.Element;
|
|
1164
|
-
}
|
|
1165
|
-
export {};
|
|
1166
|
-
|
|
1167
1154
|
}
|
|
1168
1155
|
declare module "@babylonjs/node-editor/sharedComponents/draggableLineComponent" {
|
|
1169
1156
|
import * as React from "react";
|
|
@@ -1209,46 +1196,6 @@ export class FileButtonLineComponent extends React.Component<IFileButtonLineComp
|
|
|
1209
1196
|
}
|
|
1210
1197
|
export {};
|
|
1211
1198
|
|
|
1212
|
-
}
|
|
1213
|
-
declare module "@babylonjs/node-editor/sharedComponents/floatLineComponent" {
|
|
1214
|
-
import * as React from "react";
|
|
1215
|
-
import { Observable } from "@babylonjs/core/Misc/observable";
|
|
1216
|
-
import { PropertyChangedEvent } from "@babylonjs/node-editor/sharedComponents/propertyChangedEvent";
|
|
1217
|
-
import { GlobalState } from "@babylonjs/node-editor/globalState";
|
|
1218
|
-
interface IFloatLineComponentProps {
|
|
1219
|
-
label: string;
|
|
1220
|
-
target: any;
|
|
1221
|
-
propertyName: string;
|
|
1222
|
-
onChange?: (newValue: number) => void;
|
|
1223
|
-
isInteger?: boolean;
|
|
1224
|
-
onPropertyChangedObservable?: Observable<PropertyChangedEvent>;
|
|
1225
|
-
additionalClass?: string;
|
|
1226
|
-
step?: string;
|
|
1227
|
-
digits?: number;
|
|
1228
|
-
globalState: GlobalState;
|
|
1229
|
-
min?: number;
|
|
1230
|
-
max?: number;
|
|
1231
|
-
smallUI?: boolean;
|
|
1232
|
-
onEnter?: (newValue: number) => void;
|
|
1233
|
-
}
|
|
1234
|
-
export class FloatLineComponent extends React.Component<IFloatLineComponentProps, {
|
|
1235
|
-
value: string;
|
|
1236
|
-
}> {
|
|
1237
|
-
private _localChange;
|
|
1238
|
-
private _store;
|
|
1239
|
-
private _regExp;
|
|
1240
|
-
private _onFocus;
|
|
1241
|
-
constructor(props: IFloatLineComponentProps);
|
|
1242
|
-
shouldComponentUpdate(nextProps: IFloatLineComponentProps, nextState: {
|
|
1243
|
-
value: string;
|
|
1244
|
-
}): boolean;
|
|
1245
|
-
componentWillUnmount(): void;
|
|
1246
|
-
raiseOnPropertyChanged(newValue: number, previousValue: number): void;
|
|
1247
|
-
updateValue(valueString: string): void;
|
|
1248
|
-
render(): JSX.Element;
|
|
1249
|
-
}
|
|
1250
|
-
export {};
|
|
1251
|
-
|
|
1252
1199
|
}
|
|
1253
1200
|
declare module "@babylonjs/node-editor/sharedComponents/lineContainerComponent" {
|
|
1254
1201
|
import * as React from "react";
|
|
@@ -1306,33 +1253,6 @@ export class MessageDialogComponent extends React.Component<IMessageDialogCompon
|
|
|
1306
1253
|
}
|
|
1307
1254
|
export {};
|
|
1308
1255
|
|
|
1309
|
-
}
|
|
1310
|
-
declare module "@babylonjs/node-editor/sharedComponents/numericInputComponent" {
|
|
1311
|
-
import * as React from "react";
|
|
1312
|
-
import { GlobalState } from "@babylonjs/node-editor/globalState";
|
|
1313
|
-
interface INumericInputComponentProps {
|
|
1314
|
-
label: string;
|
|
1315
|
-
value: number;
|
|
1316
|
-
step?: number;
|
|
1317
|
-
onChange: (value: number) => void;
|
|
1318
|
-
globalState: GlobalState;
|
|
1319
|
-
}
|
|
1320
|
-
export class NumericInputComponent extends React.Component<INumericInputComponentProps, {
|
|
1321
|
-
value: string;
|
|
1322
|
-
}> {
|
|
1323
|
-
static defaultProps: {
|
|
1324
|
-
step: number;
|
|
1325
|
-
};
|
|
1326
|
-
private _localChange;
|
|
1327
|
-
constructor(props: INumericInputComponentProps);
|
|
1328
|
-
shouldComponentUpdate(nextProps: INumericInputComponentProps, nextState: {
|
|
1329
|
-
value: string;
|
|
1330
|
-
}): boolean;
|
|
1331
|
-
updateValue(evt: any): void;
|
|
1332
|
-
render(): JSX.Element;
|
|
1333
|
-
}
|
|
1334
|
-
export {};
|
|
1335
|
-
|
|
1336
1256
|
}
|
|
1337
1257
|
declare module "@babylonjs/node-editor/sharedComponents/popup" {
|
|
1338
1258
|
export class Popup {
|
|
@@ -1340,69 +1260,6 @@ export class Popup {
|
|
|
1340
1260
|
static _CopyStyles(sourceDoc: HTMLDocument, targetDoc: HTMLDocument): void;
|
|
1341
1261
|
}
|
|
1342
1262
|
|
|
1343
|
-
}
|
|
1344
|
-
declare module "@babylonjs/node-editor/sharedComponents/propertyChangedEvent" {
|
|
1345
|
-
export class PropertyChangedEvent {
|
|
1346
|
-
object: any;
|
|
1347
|
-
property: string;
|
|
1348
|
-
value: any;
|
|
1349
|
-
initialValue: any;
|
|
1350
|
-
}
|
|
1351
|
-
|
|
1352
|
-
}
|
|
1353
|
-
declare module "@babylonjs/node-editor/sharedComponents/sliderLineComponent" {
|
|
1354
|
-
import * as React from "react";
|
|
1355
|
-
import { Observable } from "@babylonjs/core/Misc/observable";
|
|
1356
|
-
import { PropertyChangedEvent } from "@babylonjs/node-editor/sharedComponents/propertyChangedEvent";
|
|
1357
|
-
import { GlobalState } from "@babylonjs/node-editor/globalState";
|
|
1358
|
-
interface ISliderLineComponentProps {
|
|
1359
|
-
label: string;
|
|
1360
|
-
target?: any;
|
|
1361
|
-
propertyName?: string;
|
|
1362
|
-
minimum: number;
|
|
1363
|
-
maximum: number;
|
|
1364
|
-
step: number;
|
|
1365
|
-
directValue?: number;
|
|
1366
|
-
useEuler?: boolean;
|
|
1367
|
-
onChange?: (value: number) => void;
|
|
1368
|
-
onInput?: (value: number) => void;
|
|
1369
|
-
onPropertyChangedObservable?: Observable<PropertyChangedEvent>;
|
|
1370
|
-
decimalCount?: number;
|
|
1371
|
-
globalState: GlobalState;
|
|
1372
|
-
}
|
|
1373
|
-
export class SliderLineComponent extends React.Component<ISliderLineComponentProps, {
|
|
1374
|
-
value: number;
|
|
1375
|
-
}> {
|
|
1376
|
-
private _localChange;
|
|
1377
|
-
constructor(props: ISliderLineComponentProps);
|
|
1378
|
-
shouldComponentUpdate(nextProps: ISliderLineComponentProps, nextState: {
|
|
1379
|
-
value: number;
|
|
1380
|
-
}): boolean;
|
|
1381
|
-
onChange(newValueString: any): void;
|
|
1382
|
-
onInput(newValueString: any): void;
|
|
1383
|
-
prepareDataToRead(value: number): number;
|
|
1384
|
-
render(): JSX.Element;
|
|
1385
|
-
}
|
|
1386
|
-
export {};
|
|
1387
|
-
|
|
1388
|
-
}
|
|
1389
|
-
declare module "@babylonjs/node-editor/sharedComponents/textLineComponent" {
|
|
1390
|
-
import * as React from "react";
|
|
1391
|
-
interface ITextLineComponentProps {
|
|
1392
|
-
label: string;
|
|
1393
|
-
value: string;
|
|
1394
|
-
color?: string;
|
|
1395
|
-
underline?: boolean;
|
|
1396
|
-
onLink?: () => void;
|
|
1397
|
-
}
|
|
1398
|
-
export class TextLineComponent extends React.Component<ITextLineComponentProps> {
|
|
1399
|
-
constructor(props: ITextLineComponentProps);
|
|
1400
|
-
onLink(): void;
|
|
1401
|
-
renderContent(): JSX.Element;
|
|
1402
|
-
render(): JSX.Element;
|
|
1403
|
-
}
|
|
1404
|
-
export {};
|
|
1405
|
-
|
|
1406
1263
|
}
|
|
1407
1264
|
declare module "@babylonjs/node-editor/sharedComponents/textureLineComponent" {
|
|
1408
1265
|
import * as React from "react";
|
|
@@ -1436,6 +1293,7 @@ export {};
|
|
|
1436
1293
|
}
|
|
1437
1294
|
declare module "@babylonjs/node-editor/colorPicker/colorComponentEntry" {
|
|
1438
1295
|
import * as React from "react";
|
|
1296
|
+
import { LockObject } from "@babylonjs/node-editor/tabs/propertyGrids/lockObject";
|
|
1439
1297
|
export interface IColorComponentEntryProps {
|
|
1440
1298
|
value: number;
|
|
1441
1299
|
label: string;
|
|
@@ -1443,10 +1301,13 @@ export interface IColorComponentEntryProps {
|
|
|
1443
1301
|
min?: number;
|
|
1444
1302
|
onChange: (value: number) => void;
|
|
1445
1303
|
disabled?: boolean;
|
|
1304
|
+
lockObject: LockObject;
|
|
1446
1305
|
}
|
|
1447
1306
|
export class ColorComponentEntry extends React.Component<IColorComponentEntryProps> {
|
|
1448
1307
|
constructor(props: IColorComponentEntryProps);
|
|
1449
1308
|
updateValue(valueString: string): void;
|
|
1309
|
+
lock(): void;
|
|
1310
|
+
unlock(): void;
|
|
1450
1311
|
render(): JSX.Element;
|
|
1451
1312
|
}
|
|
1452
1313
|
|
|
@@ -1454,6 +1315,7 @@ export class ColorComponentEntry extends React.Component<IColorComponentEntryPro
|
|
|
1454
1315
|
declare module "@babylonjs/node-editor/colorPicker/colorPicker" {
|
|
1455
1316
|
import * as React from "react";
|
|
1456
1317
|
import { Color3, Color4 } from "@babylonjs/core/Maths/math.color";
|
|
1318
|
+
import { LockObject } from "@babylonjs/node-editor/tabs/propertyGrids/lockObject";
|
|
1457
1319
|
import "@babylonjs/node-editor/colorPicker/colorPicker.scss";
|
|
1458
1320
|
/**
|
|
1459
1321
|
* Interface used to specify creation options for color picker
|
|
@@ -1463,6 +1325,7 @@ export interface IColorPickerProps {
|
|
|
1463
1325
|
linearhint?: boolean;
|
|
1464
1326
|
debugMode?: boolean;
|
|
1465
1327
|
onColorChanged?: (color: Color3 | Color4) => void;
|
|
1328
|
+
lockObject: LockObject;
|
|
1466
1329
|
}
|
|
1467
1330
|
/**
|
|
1468
1331
|
* Interface used to specify creation options for color picker
|
|
@@ -1497,10 +1360,12 @@ export class ColorPicker extends React.Component<IColorPickerProps, IColorPicker
|
|
|
1497
1360
|
}
|
|
1498
1361
|
declare module "@babylonjs/node-editor/colorPicker/hexColor" {
|
|
1499
1362
|
import * as React from "react";
|
|
1363
|
+
import { LockObject } from "@babylonjs/node-editor/tabs/propertyGrids/lockObject";
|
|
1500
1364
|
export interface IHexColorProps {
|
|
1501
1365
|
value: string;
|
|
1502
1366
|
expectedLength: number;
|
|
1503
1367
|
onChange: (value: string) => void;
|
|
1368
|
+
lockObject: LockObject;
|
|
1504
1369
|
}
|
|
1505
1370
|
export class HexColor extends React.Component<IHexColorProps, {
|
|
1506
1371
|
hex: string;
|
|
@@ -1509,6 +1374,8 @@ export class HexColor extends React.Component<IHexColorProps, {
|
|
|
1509
1374
|
shouldComponentUpdate(nextProps: IHexColorProps, nextState: {
|
|
1510
1375
|
hex: string;
|
|
1511
1376
|
}): boolean;
|
|
1377
|
+
lock(): void;
|
|
1378
|
+
unlock(): void;
|
|
1512
1379
|
updateHexValue(valueString: string): void;
|
|
1513
1380
|
render(): JSX.Element;
|
|
1514
1381
|
}
|
|
@@ -1641,7 +1508,7 @@ export interface IColor3LineComponentProps {
|
|
|
1641
1508
|
onPropertyChangedObservable?: Observable<PropertyChangedEvent>;
|
|
1642
1509
|
isLinear?: boolean;
|
|
1643
1510
|
icon?: string;
|
|
1644
|
-
lockObject
|
|
1511
|
+
lockObject: LockObject;
|
|
1645
1512
|
iconLabel?: string;
|
|
1646
1513
|
onChange?: () => void;
|
|
1647
1514
|
}
|
|
@@ -1664,7 +1531,7 @@ export interface IColor4LineComponentProps {
|
|
|
1664
1531
|
isLinear?: boolean;
|
|
1665
1532
|
icon?: string;
|
|
1666
1533
|
iconLabel?: string;
|
|
1667
|
-
lockObject
|
|
1534
|
+
lockObject: LockObject;
|
|
1668
1535
|
}
|
|
1669
1536
|
export class Color4LineComponent extends React.Component<IColor4LineComponentProps> {
|
|
1670
1537
|
render(): JSX.Element;
|
|
@@ -1686,8 +1553,8 @@ export interface IColorLineComponentProps {
|
|
|
1686
1553
|
isLinear?: boolean;
|
|
1687
1554
|
icon?: string;
|
|
1688
1555
|
iconLabel?: string;
|
|
1689
|
-
lockObject?: LockObject;
|
|
1690
1556
|
disableAlpha?: boolean;
|
|
1557
|
+
lockObject: LockObject;
|
|
1691
1558
|
}
|
|
1692
1559
|
interface IColorLineComponentState {
|
|
1693
1560
|
isExpanded: boolean;
|
|
@@ -1717,6 +1584,7 @@ export {};
|
|
|
1717
1584
|
declare module "@babylonjs/node-editor/lines/colorPickerComponent" {
|
|
1718
1585
|
import * as React from "react";
|
|
1719
1586
|
import { Color4, Color3 } from "@babylonjs/core/Maths/math.color";
|
|
1587
|
+
import { LockObject } from "@babylonjs/node-editor/tabs/propertyGrids/lockObject";
|
|
1720
1588
|
export interface IColorPickerComponentProps {
|
|
1721
1589
|
value: Color4 | Color3;
|
|
1722
1590
|
linearHint?: boolean;
|
|
@@ -1724,6 +1592,7 @@ export interface IColorPickerComponentProps {
|
|
|
1724
1592
|
icon?: string;
|
|
1725
1593
|
iconLabel?: string;
|
|
1726
1594
|
shouldPopRight?: boolean;
|
|
1595
|
+
lockObject?: LockObject;
|
|
1727
1596
|
}
|
|
1728
1597
|
interface IColorPickerComponentState {
|
|
1729
1598
|
pickerEnabled: boolean;
|
|
@@ -1807,7 +1676,7 @@ interface IFloatLineComponentProps {
|
|
|
1807
1676
|
label: string;
|
|
1808
1677
|
target: any;
|
|
1809
1678
|
propertyName: string;
|
|
1810
|
-
lockObject
|
|
1679
|
+
lockObject: LockObject;
|
|
1811
1680
|
onChange?: (newValue: number) => void;
|
|
1812
1681
|
isInteger?: boolean;
|
|
1813
1682
|
onPropertyChangedObservable?: Observable<PropertyChangedEvent>;
|
|
@@ -2009,6 +1878,7 @@ import { Vector3, Vector4 } from "@babylonjs/core/Maths/math.vector";
|
|
|
2009
1878
|
import { Matrix } from "@babylonjs/core/Maths/math.vector";
|
|
2010
1879
|
import { Observable } from "@babylonjs/core/Misc/observable";
|
|
2011
1880
|
import { PropertyChangedEvent } from "@babylonjs/node-editor/propertyChangedEvent";
|
|
1881
|
+
import { LockObject } from "@babylonjs/node-editor/tabs/propertyGrids/lockObject";
|
|
2012
1882
|
interface IMatrixLineComponentProps {
|
|
2013
1883
|
label: string;
|
|
2014
1884
|
target: any;
|
|
@@ -2018,6 +1888,7 @@ interface IMatrixLineComponentProps {
|
|
|
2018
1888
|
onModeChange?: (mode: number) => void;
|
|
2019
1889
|
onPropertyChangedObservable?: Observable<PropertyChangedEvent>;
|
|
2020
1890
|
mode?: number;
|
|
1891
|
+
lockObject: LockObject;
|
|
2021
1892
|
}
|
|
2022
1893
|
export class MatrixLineComponent extends React.Component<IMatrixLineComponentProps, {
|
|
2023
1894
|
value: Matrix;
|
|
@@ -2057,6 +1928,7 @@ export {};
|
|
|
2057
1928
|
}
|
|
2058
1929
|
declare module "@babylonjs/node-editor/lines/numericInputComponent" {
|
|
2059
1930
|
import * as React from "react";
|
|
1931
|
+
import { LockObject } from "@babylonjs/node-editor/tabs/propertyGrids/lockObject";
|
|
2060
1932
|
interface INumericInputComponentProps {
|
|
2061
1933
|
label: string;
|
|
2062
1934
|
value: number;
|
|
@@ -2065,6 +1937,7 @@ interface INumericInputComponentProps {
|
|
|
2065
1937
|
precision?: number;
|
|
2066
1938
|
icon?: string;
|
|
2067
1939
|
iconLabel?: string;
|
|
1940
|
+
lockObject: LockObject;
|
|
2068
1941
|
}
|
|
2069
1942
|
export class NumericInputComponent extends React.Component<INumericInputComponentProps, {
|
|
2070
1943
|
value: string;
|
|
@@ -2074,6 +1947,7 @@ export class NumericInputComponent extends React.Component<INumericInputComponen
|
|
|
2074
1947
|
};
|
|
2075
1948
|
private _localChange;
|
|
2076
1949
|
constructor(props: INumericInputComponentProps);
|
|
1950
|
+
componentWillUnmount(): void;
|
|
2077
1951
|
shouldComponentUpdate(nextProps: INumericInputComponentProps, nextState: {
|
|
2078
1952
|
value: string;
|
|
2079
1953
|
}): boolean;
|
|
@@ -2176,7 +2050,7 @@ interface ISliderLineComponentProps {
|
|
|
2176
2050
|
margin?: boolean;
|
|
2177
2051
|
icon?: string;
|
|
2178
2052
|
iconLabel?: string;
|
|
2179
|
-
lockObject
|
|
2053
|
+
lockObject: LockObject;
|
|
2180
2054
|
unit?: React.ReactNode;
|
|
2181
2055
|
}
|
|
2182
2056
|
export class SliderLineComponent extends React.Component<ISliderLineComponentProps, {
|
|
@@ -2252,7 +2126,7 @@ export class TextInputLineComponent extends React.Component<ITextInputLineCompon
|
|
|
2252
2126
|
}): boolean;
|
|
2253
2127
|
raiseOnPropertyChanged(newValue: string, previousValue: string): void;
|
|
2254
2128
|
getCurrentNumericValue(value: string): number;
|
|
2255
|
-
updateValue(value: string): void;
|
|
2129
|
+
updateValue(value: string, valueToValidate?: string): void;
|
|
2256
2130
|
incrementValue(amount: number): void;
|
|
2257
2131
|
onKeyDown(event: React.KeyboardEvent): void;
|
|
2258
2132
|
render(): JSX.Element;
|
|
@@ -2317,6 +2191,7 @@ import * as React from "react";
|
|
|
2317
2191
|
import { Vector2 } from "@babylonjs/core/Maths/math.vector";
|
|
2318
2192
|
import { Observable } from "@babylonjs/core/Misc/observable";
|
|
2319
2193
|
import { PropertyChangedEvent } from "@babylonjs/node-editor/propertyChangedEvent";
|
|
2194
|
+
import { LockObject } from "@babylonjs/node-editor/tabs/propertyGrids/lockObject";
|
|
2320
2195
|
interface IVector2LineComponentProps {
|
|
2321
2196
|
label: string;
|
|
2322
2197
|
target: any;
|
|
@@ -2326,6 +2201,7 @@ interface IVector2LineComponentProps {
|
|
|
2326
2201
|
onPropertyChangedObservable?: Observable<PropertyChangedEvent>;
|
|
2327
2202
|
icon?: string;
|
|
2328
2203
|
iconLabel?: string;
|
|
2204
|
+
lockObject: LockObject;
|
|
2329
2205
|
}
|
|
2330
2206
|
export class Vector2LineComponent extends React.Component<IVector2LineComponentProps, {
|
|
2331
2207
|
isExpanded: boolean;
|
|
@@ -2354,6 +2230,7 @@ import * as React from "react";
|
|
|
2354
2230
|
import { Vector3 } from "@babylonjs/core/Maths/math.vector";
|
|
2355
2231
|
import { Observable } from "@babylonjs/core/Misc/observable";
|
|
2356
2232
|
import { PropertyChangedEvent } from "@babylonjs/node-editor/propertyChangedEvent";
|
|
2233
|
+
import { LockObject } from "@babylonjs/node-editor/tabs/propertyGrids/lockObject";
|
|
2357
2234
|
interface IVector3LineComponentProps {
|
|
2358
2235
|
label: string;
|
|
2359
2236
|
target: any;
|
|
@@ -2365,6 +2242,7 @@ interface IVector3LineComponentProps {
|
|
|
2365
2242
|
noSlider?: boolean;
|
|
2366
2243
|
icon?: string;
|
|
2367
2244
|
iconLabel?: string;
|
|
2245
|
+
lockObject: LockObject;
|
|
2368
2246
|
}
|
|
2369
2247
|
export class Vector3LineComponent extends React.Component<IVector3LineComponentProps, {
|
|
2370
2248
|
isExpanded: boolean;
|
|
@@ -2396,6 +2274,7 @@ import * as React from "react";
|
|
|
2396
2274
|
import { Vector4 } from "@babylonjs/core/Maths/math.vector";
|
|
2397
2275
|
import { Observable } from "@babylonjs/core/Misc/observable";
|
|
2398
2276
|
import { PropertyChangedEvent } from "@babylonjs/node-editor/propertyChangedEvent";
|
|
2277
|
+
import { LockObject } from "@babylonjs/node-editor/tabs/propertyGrids/lockObject";
|
|
2399
2278
|
interface IVector4LineComponentProps {
|
|
2400
2279
|
label: string;
|
|
2401
2280
|
target?: any;
|
|
@@ -2407,6 +2286,7 @@ interface IVector4LineComponentProps {
|
|
|
2407
2286
|
icon?: string;
|
|
2408
2287
|
iconLabel?: string;
|
|
2409
2288
|
value?: Vector4;
|
|
2289
|
+
lockObject: LockObject;
|
|
2410
2290
|
}
|
|
2411
2291
|
export class Vector4LineComponent extends React.Component<IVector4LineComponentProps, {
|
|
2412
2292
|
isExpanded: boolean;
|
|
@@ -2488,6 +2368,7 @@ export interface IGraphCanvasComponentProps {
|
|
|
2488
2368
|
onEmitNewNode: (nodeData: INodeData) => GraphNode;
|
|
2489
2369
|
}
|
|
2490
2370
|
export class GraphCanvasComponent extends React.Component<IGraphCanvasComponentProps> implements INodeContainer {
|
|
2371
|
+
static readonly NodeWidth: number;
|
|
2491
2372
|
private readonly _minZoom;
|
|
2492
2373
|
private readonly _maxZoom;
|
|
2493
2374
|
private _hostCanvas;
|
|
@@ -2524,6 +2405,8 @@ export class GraphCanvasComponent extends React.Component<IGraphCanvasComponentP
|
|
|
2524
2405
|
private _oldY;
|
|
2525
2406
|
_frameIsMoving: boolean;
|
|
2526
2407
|
_isLoading: boolean;
|
|
2408
|
+
private _copiedNodes;
|
|
2409
|
+
private _copiedFrames;
|
|
2527
2410
|
get gridSize(): number;
|
|
2528
2411
|
set gridSize(value: number);
|
|
2529
2412
|
get stateManager(): StateManager;
|
|
@@ -2547,6 +2430,11 @@ export class GraphCanvasComponent extends React.Component<IGraphCanvasComponentP
|
|
|
2547
2430
|
get frameContainer(): HTMLDivElement;
|
|
2548
2431
|
private _selectedFrameAndNodesConflict;
|
|
2549
2432
|
constructor(props: IGraphCanvasComponentProps);
|
|
2433
|
+
populateConnectedEntriesBeforeRemoval(item: GraphNode, items: GraphNode[], inputs: Nullable<IPortData>[], outputs: Nullable<IPortData>[]): void;
|
|
2434
|
+
automaticRewire(inputs: Nullable<IPortData>[], outputs: Nullable<IPortData>[]): void;
|
|
2435
|
+
handleKeyDown(evt: KeyboardEvent, onRemove: (nodeData: INodeData) => void, mouseLocationX: number, mouseLocationY: number, dataGenerator: (nodeData: INodeData) => any, rootElement: HTMLDivElement): void;
|
|
2436
|
+
pasteSelection(copiedNodes: GraphNode[], currentX: number, currentY: number, dataGenerator: (nodeData: INodeData) => any, selectNew?: boolean): GraphNode[];
|
|
2437
|
+
reconnectNewNodes(nodeIndex: number, newNodes: GraphNode[], sourceNodes: GraphNode[], done: boolean[]): void;
|
|
2550
2438
|
getCachedData(): any[];
|
|
2551
2439
|
removeDataFromCache(data: any): void;
|
|
2552
2440
|
createNodeFromObject(nodeData: INodeData, onNodeCreated: (data: any) => void, recursion?: boolean): GraphNode;
|
|
@@ -2568,6 +2456,7 @@ export class GraphCanvasComponent extends React.Component<IGraphCanvasComponentP
|
|
|
2568
2456
|
zoomToFit(): void;
|
|
2569
2457
|
processCandidatePort(): void;
|
|
2570
2458
|
connectNodes(nodeA: GraphNode, pointA: IPortData, nodeB: GraphNode, pointB: IPortData): void;
|
|
2459
|
+
drop(newNode: GraphNode, targetX: number, targetY: number, offsetX: number, offsetY: number): void;
|
|
2571
2460
|
processEditorData(editorData: IEditorData): void;
|
|
2572
2461
|
reOrganize(editorData?: Nullable<IEditorData>, isImportingAFrame?: boolean): void;
|
|
2573
2462
|
addFrame(frameData: IFrameData): void;
|
|
@@ -2745,7 +2634,8 @@ export class GraphNode {
|
|
|
2745
2634
|
content: INodeData;
|
|
2746
2635
|
private _visual;
|
|
2747
2636
|
private _headerContainer;
|
|
2748
|
-
private
|
|
2637
|
+
private _headerIcon;
|
|
2638
|
+
private _headerIconImg;
|
|
2749
2639
|
private _header;
|
|
2750
2640
|
private _connections;
|
|
2751
2641
|
private _inputsContainer;
|
|
@@ -2841,7 +2731,7 @@ export interface INodeData {
|
|
|
2841
2731
|
uniqueId: number;
|
|
2842
2732
|
isInput: boolean;
|
|
2843
2733
|
comments: string;
|
|
2844
|
-
|
|
2734
|
+
prepareHeaderIcon: (iconDiv: HTMLDivElement, img: HTMLImageElement) => void;
|
|
2845
2735
|
getClassName: () => string;
|
|
2846
2736
|
dispose: () => void;
|
|
2847
2737
|
getPortByName: (name: string) => Nullable<IPortData>;
|
|
@@ -2902,6 +2792,7 @@ export interface IPortData {
|
|
|
2902
2792
|
hasEndpoints: boolean;
|
|
2903
2793
|
endpoints: Nullable<IPortData[]>;
|
|
2904
2794
|
updateDisplayName: (newName: string) => void;
|
|
2795
|
+
canConnectTo: (port: IPortData) => boolean;
|
|
2905
2796
|
connectTo: (port: IPortData) => void;
|
|
2906
2797
|
disconnectFrom: (port: IPortData) => void;
|
|
2907
2798
|
checkCompatibilityState(port: IPortData): number;
|
|
@@ -3045,7 +2936,7 @@ export class StateManager {
|
|
|
3045
2936
|
targetY: number;
|
|
3046
2937
|
needRepositioning?: boolean | undefined;
|
|
3047
2938
|
}>;
|
|
3048
|
-
exportData: (data: any) => string;
|
|
2939
|
+
exportData: (data: any, frame?: Nullable<GraphFrame>) => string;
|
|
3049
2940
|
isElbowConnectionAllowed: (nodeA: FrameNodePort | NodePort, nodeB: FrameNodePort | NodePort) => boolean;
|
|
3050
2941
|
applyNodePortDesign: (data: IPortData, element: HTMLElement, img: HTMLImageElement) => void;
|
|
3051
2942
|
storeEditorData: (serializationObject: any, frame?: Nullable<GraphFrame>) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@babylonjs/node-editor",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.15.0",
|
|
4
4
|
"main": "dist/babylon.nodeEditor.max.js",
|
|
5
5
|
"module": "dist/babylon.nodeEditor.max.js",
|
|
6
6
|
"esnext": "dist/babylon.nodeEditor.max.js",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@types/react-dom": ">=16.0.9"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@babylonjs/core": "^5.
|
|
26
|
+
"@babylonjs/core": "^5.15.0",
|
|
27
27
|
"react": "^17.0.2",
|
|
28
28
|
"react-dom": "^17.0.2",
|
|
29
29
|
"rimraf": "^3.0.2",
|