@babylonjs/node-editor 5.19.0 → 5.22.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" />
@@ -2950,10 +2946,10 @@ export class StateManager {
2950
2946
  getEditorDataMap: () => {
2951
2947
  [key: number]: number;
2952
2948
  };
2953
- createDefaultInputData: (rootData: any, portData: IPortData, nodeContainer: INodeContainer) => {
2949
+ createDefaultInputData: (rootData: any, portData: IPortData, nodeContainer: INodeContainer) => Nullable<{
2954
2950
  data: INodeData;
2955
2951
  name: string;
2956
- };
2952
+ }>;
2957
2953
  }
2958
2954
 
2959
2955
  }
@@ -3031,6 +3027,18 @@ const _default: {
3031
3027
  export default _default;
3032
3028
  export const Default: any;
3033
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
+
3034
3042
  }
3035
3043
  declare module "@babylonjs/node-editor/stories/Toggle.stories" {
3036
3044
  /// <reference types="react" />
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babylonjs/node-editor",
3
- "version": "5.19.0",
3
+ "version": "5.22.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.19.0",
26
+ "@babylonjs/core": "^5.22.0",
27
27
  "react": "^17.0.2",
28
28
  "react-dom": "^17.0.2",
29
29
  "rimraf": "^3.0.2",