babylonjs-node-editor 7.25.2 → 7.26.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.
@@ -178,7 +178,7 @@ declare module BABYLON.NodeEditor {
178
178
 
179
179
 
180
180
  export class BlockTools {
181
- static GetBlockFromString(data: string, scene: BABYLON.Scene, nodeMaterial: BABYLON.NodeMaterial): BABYLON.NodeMaterialTeleportInBlock | BABYLON.NodeMaterialTeleportOutBlock | BABYLON.HeightToNormalBlock | 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.PrePassTextureBlock | BABYLON.ImageProcessingBlock | BABYLON.ColorMergerBlock | BABYLON.VectorMergerBlock | BABYLON.ColorSplitterBlock | BABYLON.VectorSplitterBlock | BABYLON.TextureBlock | BABYLON.ReflectionTextureBlock | BABYLON.LightBlock | BABYLON.FogBlock | BABYLON.VertexOutputBlock | BABYLON.FragmentOutputBlock | BABYLON.PrePassOutputBlock | 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.TBNBlock | BABYLON.RandomNumberBlock | BABYLON.ReplaceColorBlock | BABYLON.PosterizeBlock | BABYLON.ArcTan2Block | BABYLON.GradientBlock | BABYLON.FrontFacingBlock | BABYLON.MeshAttributeExistsBlock | 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 | BABYLON.FragDepthBlock | BABYLON.ShadowMapBlock | BABYLON.TriPlanarBlock | BABYLON.MatrixTransposeBlock | BABYLON.MatrixDeterminantBlock | BABYLON.CurveBlock | null;
181
+ static GetBlockFromString(data: string, scene: BABYLON.Scene, nodeMaterial: BABYLON.NodeMaterial): BABYLON.StorageWriteBlock | BABYLON.StorageReadBlock | BABYLON.LoopBlock | BABYLON.ColorConverterBlock | BABYLON.NodeMaterialTeleportInBlock | BABYLON.NodeMaterialTeleportOutBlock | BABYLON.HeightToNormalBlock | 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.PrePassTextureBlock | BABYLON.ImageProcessingBlock | BABYLON.ColorMergerBlock | BABYLON.VectorMergerBlock | BABYLON.ColorSplitterBlock | BABYLON.VectorSplitterBlock | BABYLON.TextureBlock | BABYLON.ReflectionTextureBlock | BABYLON.LightBlock | BABYLON.FogBlock | BABYLON.VertexOutputBlock | BABYLON.FragmentOutputBlock | BABYLON.PrePassOutputBlock | 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.TBNBlock | BABYLON.RandomNumberBlock | BABYLON.ReplaceColorBlock | BABYLON.PosterizeBlock | BABYLON.ArcTan2Block | BABYLON.GradientBlock | BABYLON.FrontFacingBlock | BABYLON.MeshAttributeExistsBlock | 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 | BABYLON.FragDepthBlock | BABYLON.ShadowMapBlock | BABYLON.TriPlanarBlock | BABYLON.MatrixTransposeBlock | BABYLON.MatrixDeterminantBlock | BABYLON.CurveBlock | null;
182
182
  static GetColorFromConnectionNodeType(type: BABYLON.NodeMaterialBlockConnectionPointTypes): string;
183
183
  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;
184
184
  static GetStringFromConnectionNodeType(type: BABYLON.NodeMaterialBlockConnectionPointTypes): "" | "Float" | "Vector2" | "Vector3" | "Vector4" | "Matrix" | "Color3" | "Color4";
@@ -681,6 +681,15 @@ declare module BABYLON.NodeEditor {
681
681
  }
682
682
 
683
683
 
684
+ export class LoopDisplayManager implements BABYLON.NodeEditor.SharedUIComponents.IDisplayManager {
685
+ getHeaderClass(): string;
686
+ shouldDisplayPortLabels(): boolean;
687
+ getHeaderText(nodeData: BABYLON.NodeEditor.SharedUIComponents.INodeData): string;
688
+ getBackgroundColor(): string;
689
+ updatePreviewContent(nodeData: BABYLON.NodeEditor.SharedUIComponents.INodeData, contentArea: HTMLDivElement): void;
690
+ }
691
+
692
+
684
693
  export class InputDisplayManager implements BABYLON.NodeEditor.SharedUIComponents.IDisplayManager {
685
694
  getHeaderClass(nodeData: BABYLON.NodeEditor.SharedUIComponents.INodeData): string;
686
695
  shouldDisplayPortLabels(): boolean;
@@ -1068,8 +1077,9 @@ declare module BABYLON.NodeEditor.SharedUIComponents {
1068
1077
  * Class handling undo / redo operations
1069
1078
  */
1070
1079
  export class HistoryStack implements BABYLON.IDisposable {
1071
- private _history;
1080
+ private _historyStack;
1072
1081
  private _redoStack;
1082
+ private _activeData;
1073
1083
  private readonly _maxHistoryLength;
1074
1084
  private _locked;
1075
1085
  private _dataProvider;
@@ -1080,13 +1090,19 @@ declare module BABYLON.NodeEditor.SharedUIComponents {
1080
1090
  * @param applyUpdate defines the code to execute when undo/redo operation is required
1081
1091
  */
1082
1092
  constructor(dataProvider: () => any, applyUpdate: (data: any) => void);
1093
+ /**
1094
+ * Process key event to handle undo / redo
1095
+ * @param evt defines the keyboard event to process
1096
+ * @returns true if the event was processed
1097
+ */
1098
+ processKeyEvent(evt: KeyboardEvent): boolean;
1083
1099
  /**
1084
1100
  * Resets the stack
1085
1101
  */
1086
1102
  reset(): void;
1087
1103
  private _generateJSONDiff;
1088
1104
  private _applyJSONDiff;
1089
- private _rebuildState;
1105
+ private _copy;
1090
1106
  /**
1091
1107
  * Stores the current state
1092
1108
  */
@@ -1621,6 +1637,8 @@ declare module BABYLON.NodeEditor.SharedUIComponents {
1621
1637
  get nodeB(): BABYLON.NodeEditor.SharedUIComponents.GraphNode | undefined;
1622
1638
  intersectsWith(rect: DOMRect): boolean;
1623
1639
  update(endX?: number, endY?: number, straight?: boolean): void;
1640
+ get path(): SVGPathElement;
1641
+ get selectionPath(): SVGPathElement;
1624
1642
  constructor(graphCanvas: BABYLON.NodeEditor.SharedUIComponents.GraphCanvasComponent, portA: BABYLON.NodeEditor.SharedUIComponents.NodePort, nodeA: BABYLON.NodeEditor.SharedUIComponents.GraphNode, portB?: BABYLON.NodeEditor.SharedUIComponents.NodePort, nodeB?: BABYLON.NodeEditor.SharedUIComponents.GraphNode);
1625
1643
  onClick(evt: MouseEvent): void;
1626
1644
  dispose(notify?: boolean): void;
@@ -1705,6 +1723,7 @@ declare module BABYLON.NodeEditor.SharedUIComponents {
1705
1723
  set enclosingFrameId(value: number);
1706
1724
  set isSelected(value: boolean);
1707
1725
  setIsSelected(value: boolean, marqueeSelection: boolean): void;
1726
+ get rootElement(): HTMLDivElement;
1708
1727
  constructor(content: BABYLON.NodeEditor.SharedUIComponents.INodeData, stateManager: BABYLON.NodeEditor.SharedUIComponents.StateManager);
1709
1728
  isOverlappingFrame(frame: BABYLON.NodeEditor.SharedUIComponents.GraphFrame): boolean;
1710
1729
  getPortForPortData(portData: BABYLON.NodeEditor.SharedUIComponents.IPortData): BABYLON.NodeEditor.SharedUIComponents.NodePort | null;
@@ -1754,6 +1773,7 @@ declare module BABYLON.NodeEditor.SharedUIComponents {
1754
1773
  private _headerTextElement;
1755
1774
  private _headerCollapseElement;
1756
1775
  private _headerCloseElement;
1776
+ private _headerFocusElement;
1757
1777
  private _commentsElement;
1758
1778
  private _portContainer;
1759
1779
  private _outputPortContainer;
@@ -1783,6 +1803,7 @@ declare module BABYLON.NodeEditor.SharedUIComponents {
1783
1803
  private readonly _closeSVG;
1784
1804
  private readonly _expandSVG;
1785
1805
  private readonly _collapseSVG;
1806
+ private readonly _focusSVG;
1786
1807
  get id(): number;
1787
1808
  get isCollapsed(): boolean;
1788
1809
  private _createInputPort;
@@ -1811,6 +1832,11 @@ declare module BABYLON.NodeEditor.SharedUIComponents {
1811
1832
  get comments(): string;
1812
1833
  set comments(comments: string);
1813
1834
  constructor(candidate: BABYLON.Nullable<HTMLDivElement>, canvas: BABYLON.NodeEditor.SharedUIComponents.GraphCanvasComponent, doNotCaptureNodes?: boolean);
1835
+ private _isFocused;
1836
+ /**
1837
+ * Enter/leave focus mode
1838
+ */
1839
+ switchFocusMode(): void;
1814
1840
  refresh(): void;
1815
1841
  addNode(node: BABYLON.NodeEditor.SharedUIComponents.GraphNode): void;
1816
1842
  removeNode(node: BABYLON.NodeEditor.SharedUIComponents.GraphNode): void;