@babylonjs/node-editor 5.18.0 → 5.21.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.
|
@@ -84,11 +84,12 @@ import { ImageSourceBlock } from "@babylonjs/core/Materials/Node/Blocks/Dual/ima
|
|
|
84
84
|
import { CloudBlock } from "@babylonjs/core/Materials/Node/Blocks/cloudBlock";
|
|
85
85
|
import { VoronoiNoiseBlock } from "@babylonjs/core/Materials/Node/Blocks/voronoiNoiseBlock";
|
|
86
86
|
import { ScreenSpaceBlock } from "@babylonjs/core/Materials/Node/Blocks/Fragment/screenSpaceBlock";
|
|
87
|
+
import { HeightToNormalBlock } from "@babylonjs/core/Materials/Node/Blocks/Fragment/heightToNormalBlock";
|
|
87
88
|
import { TwirlBlock } from "@babylonjs/core/Materials/Node/Blocks/Fragment/twirlBlock";
|
|
88
89
|
import { ElbowBlock } from "@babylonjs/core/Materials/Node/Blocks/elbowBlock";
|
|
89
90
|
import { ClipPlanesBlock } from "@babylonjs/core/Materials/Node/Blocks/Dual/clipPlanesBlock";
|
|
90
91
|
export class BlockTools {
|
|
91
|
-
static GetBlockFromString(data: string, scene: Scene, nodeMaterial: NodeMaterial): ElbowBlock | TwirlBlock | VoronoiNoiseBlock | ScreenSpaceBlock | CloudBlock | MatrixBuilderBlock | DesaturateBlock | RefractBlock | ReflectBlock | DerivativeBlock | Rotate2dBlock | NormalBlendBlock | WorleyNoise3DBlock | SimplexPerlin3DBlock | BonesBlock | InstancesBlock | MorphTargetsBlock | DiscardBlock | ImageProcessingBlock | ColorMergerBlock | VectorMergerBlock | ColorSplitterBlock | VectorSplitterBlock | TextureBlock | ReflectionTextureBlock | LightBlock | FogBlock | VertexOutputBlock | FragmentOutputBlock | AddBlock | ClampBlock | ScaleBlock | CrossBlock | DotBlock | PowBlock | MultiplyBlock | TransformBlock | TrigonometryBlock | RemapBlock | NormalizeBlock | FresnelBlock | LerpBlock | NLerpBlock | DivideBlock | SubtractBlock | ModBlock | StepBlock | SmoothStepBlock | OneMinusBlock | ReciprocalBlock | ViewDirectionBlock | LightInformationBlock | MaxBlock | MinBlock | LengthBlock | DistanceBlock | NegateBlock | PerturbNormalBlock | TBNBlock | RandomNumberBlock | ReplaceColorBlock | PosterizeBlock | ArcTan2Block | GradientBlock | FrontFacingBlock | WaveBlock | InputBlock | PBRMetallicRoughnessBlock | SheenBlock | AnisotropyBlock | ReflectionBlock | ClearCoatBlock | RefractionBlock | SubSurfaceBlock | CurrentScreenBlock | ParticleTextureBlock | ParticleRampGradientBlock | ParticleBlendMultiplyBlock | FragCoordBlock | ScreenSizeBlock | SceneDepthBlock | ConditionalBlock | ImageSourceBlock | ClipPlanesBlock | null;
|
|
92
|
+
static GetBlockFromString(data: string, scene: Scene, nodeMaterial: NodeMaterial): HeightToNormalBlock | ElbowBlock | TwirlBlock | VoronoiNoiseBlock | ScreenSpaceBlock | CloudBlock | MatrixBuilderBlock | DesaturateBlock | RefractBlock | ReflectBlock | DerivativeBlock | Rotate2dBlock | NormalBlendBlock | WorleyNoise3DBlock | SimplexPerlin3DBlock | BonesBlock | InstancesBlock | MorphTargetsBlock | DiscardBlock | ImageProcessingBlock | ColorMergerBlock | VectorMergerBlock | ColorSplitterBlock | VectorSplitterBlock | TextureBlock | ReflectionTextureBlock | LightBlock | FogBlock | VertexOutputBlock | FragmentOutputBlock | AddBlock | ClampBlock | ScaleBlock | CrossBlock | DotBlock | PowBlock | MultiplyBlock | TransformBlock | TrigonometryBlock | RemapBlock | NormalizeBlock | FresnelBlock | LerpBlock | NLerpBlock | DivideBlock | SubtractBlock | ModBlock | StepBlock | SmoothStepBlock | OneMinusBlock | ReciprocalBlock | ViewDirectionBlock | LightInformationBlock | MaxBlock | MinBlock | LengthBlock | DistanceBlock | NegateBlock | PerturbNormalBlock | TBNBlock | RandomNumberBlock | ReplaceColorBlock | PosterizeBlock | ArcTan2Block | GradientBlock | FrontFacingBlock | WaveBlock | InputBlock | PBRMetallicRoughnessBlock | SheenBlock | AnisotropyBlock | ReflectionBlock | ClearCoatBlock | RefractionBlock | SubSurfaceBlock | CurrentScreenBlock | ParticleTextureBlock | ParticleRampGradientBlock | ParticleBlendMultiplyBlock | FragCoordBlock | ScreenSizeBlock | SceneDepthBlock | ConditionalBlock | ImageSourceBlock | ClipPlanesBlock | null;
|
|
92
93
|
static GetColorFromConnectionNodeType(type: NodeMaterialBlockConnectionPointTypes): string;
|
|
93
94
|
static GetConnectionNodeTypeFromString(type: string): NodeMaterialBlockConnectionPointTypes.Float | NodeMaterialBlockConnectionPointTypes.Vector2 | NodeMaterialBlockConnectionPointTypes.Vector3 | NodeMaterialBlockConnectionPointTypes.Vector4 | NodeMaterialBlockConnectionPointTypes.Color3 | NodeMaterialBlockConnectionPointTypes.Color4 | NodeMaterialBlockConnectionPointTypes.Matrix | NodeMaterialBlockConnectionPointTypes.AutoDetect;
|
|
94
95
|
static GetStringFromConnectionNodeType(type: NodeMaterialBlockConnectionPointTypes): "" | "Float" | "Vector2" | "Vector3" | "Vector4" | "Matrix" | "Color3" | "Color4";
|
|
@@ -498,6 +499,8 @@ interface IGraphEditorProps {
|
|
|
498
499
|
}
|
|
499
500
|
interface IGraphEditorState {
|
|
500
501
|
showPreviewPopUp: boolean;
|
|
502
|
+
message: string;
|
|
503
|
+
isError: boolean;
|
|
501
504
|
}
|
|
502
505
|
interface IInternalPreviewAreaOptions extends IInspectorOptions {
|
|
503
506
|
popup: boolean;
|
|
@@ -1237,22 +1240,6 @@ export class LineWithFileButtonComponent extends React.Component<ILineWithFileBu
|
|
|
1237
1240
|
}
|
|
1238
1241
|
export {};
|
|
1239
1242
|
|
|
1240
|
-
}
|
|
1241
|
-
declare module "@babylonjs/node-editor/sharedComponents/messageDialog" {
|
|
1242
|
-
import * as React from "react";
|
|
1243
|
-
import { GlobalState } from "@babylonjs/node-editor/globalState";
|
|
1244
|
-
interface IMessageDialogComponentProps {
|
|
1245
|
-
globalState: GlobalState;
|
|
1246
|
-
}
|
|
1247
|
-
export class MessageDialogComponent extends React.Component<IMessageDialogComponentProps, {
|
|
1248
|
-
message: string;
|
|
1249
|
-
isError: boolean;
|
|
1250
|
-
}> {
|
|
1251
|
-
constructor(props: IMessageDialogComponentProps);
|
|
1252
|
-
render(): JSX.Element | null;
|
|
1253
|
-
}
|
|
1254
|
-
export {};
|
|
1255
|
-
|
|
1256
1243
|
}
|
|
1257
1244
|
declare module "@babylonjs/node-editor/sharedComponents/popup" {
|
|
1258
1245
|
export class Popup {
|
|
@@ -1416,6 +1403,15 @@ export type LabelProps = {
|
|
|
1416
1403
|
};
|
|
1417
1404
|
export const Label: React.FC<LabelProps>;
|
|
1418
1405
|
|
|
1406
|
+
}
|
|
1407
|
+
declare module "@babylonjs/node-editor/components/MessageDialog" {
|
|
1408
|
+
import * as React from "react";
|
|
1409
|
+
export interface MessageDialogProps {
|
|
1410
|
+
message: string;
|
|
1411
|
+
isError: boolean;
|
|
1412
|
+
}
|
|
1413
|
+
export const MessageDialog: React.FC<MessageDialogProps>;
|
|
1414
|
+
|
|
1419
1415
|
}
|
|
1420
1416
|
declare module "@babylonjs/node-editor/components/Toggle" {
|
|
1421
1417
|
/// <reference types="react" />
|
|
@@ -1713,8 +1709,8 @@ export class FloatLineComponent extends React.Component<IFloatLineComponentProps
|
|
|
1713
1709
|
updateValue(valueString: string): void;
|
|
1714
1710
|
lock(): void;
|
|
1715
1711
|
unlock(): void;
|
|
1716
|
-
incrementValue(amount: number): void;
|
|
1717
|
-
onKeyDown(event: React.KeyboardEvent): void;
|
|
1712
|
+
incrementValue(amount: number, processStep?: boolean): void;
|
|
1713
|
+
onKeyDown(event: React.KeyboardEvent<HTMLInputElement>): void;
|
|
1718
1714
|
render(): JSX.Element;
|
|
1719
1715
|
}
|
|
1720
1716
|
export {};
|
|
@@ -1951,8 +1947,10 @@ export class NumericInputComponent extends React.Component<INumericInputComponen
|
|
|
1951
1947
|
shouldComponentUpdate(nextProps: INumericInputComponentProps, nextState: {
|
|
1952
1948
|
value: string;
|
|
1953
1949
|
}): boolean;
|
|
1954
|
-
updateValue(
|
|
1950
|
+
updateValue(valueString: string): void;
|
|
1955
1951
|
onBlur(): void;
|
|
1952
|
+
incrementValue(amount: number): void;
|
|
1953
|
+
onKeyDown(evt: React.KeyboardEvent<HTMLInputElement>): void;
|
|
1956
1954
|
render(): JSX.Element;
|
|
1957
1955
|
}
|
|
1958
1956
|
export {};
|
|
@@ -2405,6 +2403,7 @@ export class GraphCanvasComponent extends React.Component<IGraphCanvasComponentP
|
|
|
2405
2403
|
private _oldY;
|
|
2406
2404
|
_frameIsMoving: boolean;
|
|
2407
2405
|
_isLoading: boolean;
|
|
2406
|
+
_targetLinkCandidate: Nullable<NodeLink>;
|
|
2408
2407
|
private _copiedNodes;
|
|
2409
2408
|
private _copiedFrames;
|
|
2410
2409
|
get gridSize(): number;
|
|
@@ -2431,7 +2430,7 @@ export class GraphCanvasComponent extends React.Component<IGraphCanvasComponentP
|
|
|
2431
2430
|
private _selectedFrameAndNodesConflict;
|
|
2432
2431
|
constructor(props: IGraphCanvasComponentProps);
|
|
2433
2432
|
populateConnectedEntriesBeforeRemoval(item: GraphNode, items: GraphNode[], inputs: Nullable<IPortData>[], outputs: Nullable<IPortData>[]): void;
|
|
2434
|
-
automaticRewire(inputs: Nullable<IPortData>[], outputs: Nullable<IPortData>[]): void;
|
|
2433
|
+
automaticRewire(inputs: Nullable<IPortData>[], outputs: Nullable<IPortData>[], firstOnly?: boolean): void;
|
|
2435
2434
|
handleKeyDown(evt: KeyboardEvent, onRemove: (nodeData: INodeData) => void, mouseLocationX: number, mouseLocationY: number, dataGenerator: (nodeData: INodeData) => any, rootElement: HTMLDivElement): void;
|
|
2436
2435
|
pasteSelection(copiedNodes: GraphNode[], currentX: number, currentY: number, dataGenerator: (nodeData: INodeData) => any, selectNew?: boolean): GraphNode[];
|
|
2437
2436
|
reconnectNewNodes(nodeIndex: number, newNodes: GraphNode[], sourceNodes: GraphNode[], done: boolean[]): void;
|
|
@@ -2839,13 +2838,17 @@ export class NodeLink {
|
|
|
2839
2838
|
private _selectionPath;
|
|
2840
2839
|
private _onSelectionChangedObserver;
|
|
2841
2840
|
private _isVisible;
|
|
2841
|
+
private _isTargetCandidate;
|
|
2842
2842
|
onDisposedObservable: Observable<NodeLink>;
|
|
2843
|
+
get isTargetCandidate(): boolean;
|
|
2844
|
+
set isTargetCandidate(value: boolean);
|
|
2843
2845
|
get isVisible(): boolean;
|
|
2844
2846
|
set isVisible(value: boolean);
|
|
2845
2847
|
get portA(): FrameNodePort | NodePort;
|
|
2846
2848
|
get portB(): FrameNodePort | NodePort | undefined;
|
|
2847
2849
|
get nodeA(): GraphNode;
|
|
2848
2850
|
get nodeB(): GraphNode | undefined;
|
|
2851
|
+
intersectsWith(rect: DOMRect): boolean;
|
|
2849
2852
|
update(endX?: number, endY?: number, straight?: boolean): void;
|
|
2850
2853
|
constructor(graphCanvas: GraphCanvasComponent, portA: NodePort, nodeA: GraphNode, portB?: NodePort, nodeB?: GraphNode);
|
|
2851
2854
|
onClick(evt: MouseEvent): void;
|
|
@@ -3024,6 +3027,18 @@ const _default: {
|
|
|
3024
3027
|
export default _default;
|
|
3025
3028
|
export const Default: any;
|
|
3026
3029
|
|
|
3030
|
+
}
|
|
3031
|
+
declare module "@babylonjs/node-editor/stories/MessageDialog.stories" {
|
|
3032
|
+
/// <reference types="react" />
|
|
3033
|
+
import { MessageDialogProps } from "@babylonjs/node-editor/components/MessageDialog";
|
|
3034
|
+
const _default: {
|
|
3035
|
+
title: string;
|
|
3036
|
+
component: import("react").FC<MessageDialogProps>;
|
|
3037
|
+
};
|
|
3038
|
+
export default _default;
|
|
3039
|
+
export const NoError: any;
|
|
3040
|
+
export const Error: any;
|
|
3041
|
+
|
|
3027
3042
|
}
|
|
3028
3043
|
declare module "@babylonjs/node-editor/stories/Toggle.stories" {
|
|
3029
3044
|
/// <reference types="react" />
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@babylonjs/node-editor",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.21.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.21.0",
|
|
27
27
|
"react": "^17.0.2",
|
|
28
28
|
"react-dom": "^17.0.2",
|
|
29
29
|
"rimraf": "^3.0.2",
|