@babylonjs/node-editor 5.14.0 → 5.15.1
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
|
}
|
|
@@ -467,6 +469,7 @@ export class GlobalState {
|
|
|
467
469
|
directionalLight1: boolean;
|
|
468
470
|
controlCamera: boolean;
|
|
469
471
|
_mode: NodeMaterialModes;
|
|
472
|
+
pointerOverCanvas: boolean;
|
|
470
473
|
/** Gets the mode */
|
|
471
474
|
get mode(): NodeMaterialModes;
|
|
472
475
|
/** Sets the mode */
|
|
@@ -532,7 +535,7 @@ export class GraphEditor extends React.Component<IGraphEditorProps, IGraphEditor
|
|
|
532
535
|
reOrganize(editorData?: Nullable<IEditorData>, isImportingAFrame?: boolean): void;
|
|
533
536
|
onPointerDown(evt: React.PointerEvent<HTMLDivElement>): void;
|
|
534
537
|
onPointerUp(evt: React.PointerEvent<HTMLDivElement>): void;
|
|
535
|
-
onWheel
|
|
538
|
+
onWheel: (evt: WheelEvent) => void;
|
|
536
539
|
resizeColumns(evt: React.PointerEvent<HTMLDivElement>, forLeft?: boolean): void;
|
|
537
540
|
buildColumnLayout(): string;
|
|
538
541
|
emitNewBlock(blockType: string, targetX: number, targetY: number): void;
|
|
@@ -569,7 +572,7 @@ export class BlockNodeData implements INodeData {
|
|
|
569
572
|
set comments(value: string);
|
|
570
573
|
getPortByName(name: string): IPortData | null;
|
|
571
574
|
dispose(): void;
|
|
572
|
-
|
|
575
|
+
prepareHeaderIcon(iconDiv: HTMLDivElement, img: HTMLImageElement): void;
|
|
573
576
|
constructor(data: NodeMaterialBlock, nodeContainer: INodeContainer);
|
|
574
577
|
}
|
|
575
578
|
|
|
@@ -603,6 +606,7 @@ export class ConnectionPointPortData implements IPortData {
|
|
|
603
606
|
constructor(connectionPoint: NodeMaterialConnectionPoint, nodeContainer: INodeContainer);
|
|
604
607
|
updateDisplayName(newName: string): void;
|
|
605
608
|
connectTo(port: IPortData): void;
|
|
609
|
+
canConnectTo(port: IPortData): boolean;
|
|
606
610
|
disconnectFrom(port: IPortData): void;
|
|
607
611
|
checkCompatibilityState(port: IPortData): 0 | NodeMaterialConnectionPointCompatibilityStates.TypeIncompatible | NodeMaterialConnectionPointCompatibilityStates.TargetIncompatible | NodeMaterialConnectionPointCompatibilityStates.HierarchyIssue;
|
|
608
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";
|
|
@@ -1147,34 +1151,6 @@ export class CheckBoxLineComponent extends React.Component<ICheckBoxLineComponen
|
|
|
1147
1151
|
render(): JSX.Element;
|
|
1148
1152
|
}
|
|
1149
1153
|
|
|
1150
|
-
}
|
|
1151
|
-
declare module "@babylonjs/node-editor/sharedComponents/colorPickerComponent" {
|
|
1152
|
-
import * as React from "react";
|
|
1153
|
-
import { Color4, Color3 } from "@babylonjs/core/Maths/math.color";
|
|
1154
|
-
import { GlobalState } from "@babylonjs/node-editor/globalState";
|
|
1155
|
-
export interface IColorPickerComponentProps {
|
|
1156
|
-
value: Color4 | Color3;
|
|
1157
|
-
onColorChanged: (newOne: string) => void;
|
|
1158
|
-
globalState: GlobalState;
|
|
1159
|
-
}
|
|
1160
|
-
interface IColorPickerComponentState {
|
|
1161
|
-
pickerEnabled: boolean;
|
|
1162
|
-
color: Color3 | Color4;
|
|
1163
|
-
hex: string;
|
|
1164
|
-
}
|
|
1165
|
-
export class ColorPickerLineComponent extends React.Component<IColorPickerComponentProps, IColorPickerComponentState> {
|
|
1166
|
-
private _floatRef;
|
|
1167
|
-
private _floatHostRef;
|
|
1168
|
-
constructor(props: IColorPickerComponentProps);
|
|
1169
|
-
syncPositions(): void;
|
|
1170
|
-
shouldComponentUpdate(nextProps: IColorPickerComponentProps, nextState: IColorPickerComponentState): boolean;
|
|
1171
|
-
componentDidUpdate(): void;
|
|
1172
|
-
componentDidMount(): void;
|
|
1173
|
-
setPickerState(enabled: boolean): void;
|
|
1174
|
-
render(): JSX.Element;
|
|
1175
|
-
}
|
|
1176
|
-
export {};
|
|
1177
|
-
|
|
1178
1154
|
}
|
|
1179
1155
|
declare module "@babylonjs/node-editor/sharedComponents/draggableLineComponent" {
|
|
1180
1156
|
import * as React from "react";
|
|
@@ -1277,33 +1253,6 @@ export class MessageDialogComponent extends React.Component<IMessageDialogCompon
|
|
|
1277
1253
|
}
|
|
1278
1254
|
export {};
|
|
1279
1255
|
|
|
1280
|
-
}
|
|
1281
|
-
declare module "@babylonjs/node-editor/sharedComponents/numericInputComponent" {
|
|
1282
|
-
import * as React from "react";
|
|
1283
|
-
import { GlobalState } from "@babylonjs/node-editor/globalState";
|
|
1284
|
-
interface INumericInputComponentProps {
|
|
1285
|
-
label: string;
|
|
1286
|
-
value: number;
|
|
1287
|
-
step?: number;
|
|
1288
|
-
onChange: (value: number) => void;
|
|
1289
|
-
globalState: GlobalState;
|
|
1290
|
-
}
|
|
1291
|
-
export class NumericInputComponent extends React.Component<INumericInputComponentProps, {
|
|
1292
|
-
value: string;
|
|
1293
|
-
}> {
|
|
1294
|
-
static defaultProps: {
|
|
1295
|
-
step: number;
|
|
1296
|
-
};
|
|
1297
|
-
private _localChange;
|
|
1298
|
-
constructor(props: INumericInputComponentProps);
|
|
1299
|
-
shouldComponentUpdate(nextProps: INumericInputComponentProps, nextState: {
|
|
1300
|
-
value: string;
|
|
1301
|
-
}): boolean;
|
|
1302
|
-
updateValue(evt: any): void;
|
|
1303
|
-
render(): JSX.Element;
|
|
1304
|
-
}
|
|
1305
|
-
export {};
|
|
1306
|
-
|
|
1307
1256
|
}
|
|
1308
1257
|
declare module "@babylonjs/node-editor/sharedComponents/popup" {
|
|
1309
1258
|
export class Popup {
|
|
@@ -1727,7 +1676,7 @@ interface IFloatLineComponentProps {
|
|
|
1727
1676
|
label: string;
|
|
1728
1677
|
target: any;
|
|
1729
1678
|
propertyName: string;
|
|
1730
|
-
lockObject
|
|
1679
|
+
lockObject: LockObject;
|
|
1731
1680
|
onChange?: (newValue: number) => void;
|
|
1732
1681
|
isInteger?: boolean;
|
|
1733
1682
|
onPropertyChangedObservable?: Observable<PropertyChangedEvent>;
|
|
@@ -2101,7 +2050,7 @@ interface ISliderLineComponentProps {
|
|
|
2101
2050
|
margin?: boolean;
|
|
2102
2051
|
icon?: string;
|
|
2103
2052
|
iconLabel?: string;
|
|
2104
|
-
lockObject
|
|
2053
|
+
lockObject: LockObject;
|
|
2105
2054
|
unit?: React.ReactNode;
|
|
2106
2055
|
}
|
|
2107
2056
|
export class SliderLineComponent extends React.Component<ISliderLineComponentProps, {
|
|
@@ -2177,7 +2126,7 @@ export class TextInputLineComponent extends React.Component<ITextInputLineCompon
|
|
|
2177
2126
|
}): boolean;
|
|
2178
2127
|
raiseOnPropertyChanged(newValue: string, previousValue: string): void;
|
|
2179
2128
|
getCurrentNumericValue(value: string): number;
|
|
2180
|
-
updateValue(value: string): void;
|
|
2129
|
+
updateValue(value: string, valueToValidate?: string): void;
|
|
2181
2130
|
incrementValue(amount: number): void;
|
|
2182
2131
|
onKeyDown(event: React.KeyboardEvent): void;
|
|
2183
2132
|
render(): JSX.Element;
|
|
@@ -2481,6 +2430,8 @@ export class GraphCanvasComponent extends React.Component<IGraphCanvasComponentP
|
|
|
2481
2430
|
get frameContainer(): HTMLDivElement;
|
|
2482
2431
|
private _selectedFrameAndNodesConflict;
|
|
2483
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;
|
|
2484
2435
|
handleKeyDown(evt: KeyboardEvent, onRemove: (nodeData: INodeData) => void, mouseLocationX: number, mouseLocationY: number, dataGenerator: (nodeData: INodeData) => any, rootElement: HTMLDivElement): void;
|
|
2485
2436
|
pasteSelection(copiedNodes: GraphNode[], currentX: number, currentY: number, dataGenerator: (nodeData: INodeData) => any, selectNew?: boolean): GraphNode[];
|
|
2486
2437
|
reconnectNewNodes(nodeIndex: number, newNodes: GraphNode[], sourceNodes: GraphNode[], done: boolean[]): void;
|
|
@@ -2683,7 +2634,8 @@ export class GraphNode {
|
|
|
2683
2634
|
content: INodeData;
|
|
2684
2635
|
private _visual;
|
|
2685
2636
|
private _headerContainer;
|
|
2686
|
-
private
|
|
2637
|
+
private _headerIcon;
|
|
2638
|
+
private _headerIconImg;
|
|
2687
2639
|
private _header;
|
|
2688
2640
|
private _connections;
|
|
2689
2641
|
private _inputsContainer;
|
|
@@ -2779,7 +2731,7 @@ export interface INodeData {
|
|
|
2779
2731
|
uniqueId: number;
|
|
2780
2732
|
isInput: boolean;
|
|
2781
2733
|
comments: string;
|
|
2782
|
-
|
|
2734
|
+
prepareHeaderIcon: (iconDiv: HTMLDivElement, img: HTMLImageElement) => void;
|
|
2783
2735
|
getClassName: () => string;
|
|
2784
2736
|
dispose: () => void;
|
|
2785
2737
|
getPortByName: (name: string) => Nullable<IPortData>;
|
|
@@ -2840,6 +2792,7 @@ export interface IPortData {
|
|
|
2840
2792
|
hasEndpoints: boolean;
|
|
2841
2793
|
endpoints: Nullable<IPortData[]>;
|
|
2842
2794
|
updateDisplayName: (newName: string) => void;
|
|
2795
|
+
canConnectTo: (port: IPortData) => boolean;
|
|
2843
2796
|
connectTo: (port: IPortData) => void;
|
|
2844
2797
|
disconnectFrom: (port: IPortData) => void;
|
|
2845
2798
|
checkCompatibilityState(port: IPortData): number;
|
|
@@ -2983,7 +2936,7 @@ export class StateManager {
|
|
|
2983
2936
|
targetY: number;
|
|
2984
2937
|
needRepositioning?: boolean | undefined;
|
|
2985
2938
|
}>;
|
|
2986
|
-
exportData: (data: any) => string;
|
|
2939
|
+
exportData: (data: any, frame?: Nullable<GraphFrame>) => string;
|
|
2987
2940
|
isElbowConnectionAllowed: (nodeA: FrameNodePort | NodePort, nodeB: FrameNodePort | NodePort) => boolean;
|
|
2988
2941
|
applyNodePortDesign: (data: IPortData, element: HTMLElement, img: HTMLImageElement) => void;
|
|
2989
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.1",
|
|
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.1",
|
|
27
27
|
"react": "^17.0.2",
|
|
28
28
|
"react-dom": "^17.0.2",
|
|
29
29
|
"rimraf": "^3.0.2",
|