babylonjs-node-render-graph-editor 7.24.1 → 7.25.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.
@@ -1475,6 +1475,7 @@ import { NodeLink } from "babylonjs-node-render-graph-editor/nodeGraphSystem/nod
1475
1475
  import { FramePortData } from "babylonjs-node-render-graph-editor/nodeGraphSystem/types/framePortData";
1476
1476
  export const IsFramePortData: (variableToCheck: any) => variableToCheck is FramePortData;
1477
1477
  export const RefreshNode: (node: GraphNode, visitedNodes?: Set<GraphNode>, visitedLinks?: Set<NodeLink>, canvas?: GraphCanvasComponent) => void;
1478
+ export const BuildFloatUI: (container: HTMLDivElement, document: Document, displayName: string, isInteger: boolean, source: any, propertyName: string, onChange: () => void, min?: number, max?: number, visualPropertiesRefresh?: Array<() => void>) => void;
1478
1479
 
1479
1480
  }
1480
1481
  declare module "babylonjs-node-render-graph-editor/nodeGraphSystem/stateManager" {
@@ -1590,7 +1591,7 @@ import { StateManager } from "babylonjs-node-render-graph-editor/nodeGraphSystem
1590
1591
  import { ISelectionChangedOptions } from "babylonjs-node-render-graph-editor/nodeGraphSystem/interfaces/selectionChangedOptions";
1591
1592
  import { FrameNodePort } from "babylonjs-node-render-graph-editor/nodeGraphSystem/frameNodePort";
1592
1593
  import { IDisplayManager } from "babylonjs-node-render-graph-editor/nodeGraphSystem/interfaces/displayManager";
1593
- import { IPortData } from "babylonjs-node-render-graph-editor/nodeGraphSystem/interfaces/portData";
1594
+ import { type IPortData } from "babylonjs-node-render-graph-editor/nodeGraphSystem/interfaces/portData";
1594
1595
  export class NodePort {
1595
1596
  portData: IPortData;
1596
1597
  node: GraphNode;
@@ -1603,6 +1604,7 @@ export class NodePort {
1603
1604
  protected _onCandidateLinkMovedObserver: Nullable<Observer<Nullable<Vector2>>>;
1604
1605
  protected _onSelectionChangedObserver: Nullable<Observer<Nullable<ISelectionChangedOptions>>>;
1605
1606
  protected _exposedOnFrame: boolean;
1607
+ protected _portUIcontainer?: HTMLDivElement;
1606
1608
  delegatedPort: Nullable<FrameNodePort>;
1607
1609
  get element(): HTMLDivElement;
1608
1610
  get container(): HTMLElement;
@@ -1616,7 +1618,7 @@ export class NodePort {
1616
1618
  set exposedPortPosition(value: number);
1617
1619
  private _isConnectedToNodeOutsideOfFrame;
1618
1620
  refresh(): void;
1619
- constructor(portContainer: HTMLElement, portData: IPortData, node: GraphNode, stateManager: StateManager);
1621
+ constructor(portContainer: HTMLElement, portData: IPortData, node: GraphNode, stateManager: StateManager, portUIcontainer?: HTMLDivElement);
1620
1622
  dispose(): void;
1621
1623
  static CreatePortElement(portData: IPortData, node: GraphNode, root: HTMLElement, displayManager: Nullable<IDisplayManager>, stateManager: StateManager): NodePort;
1622
1624
  }
@@ -1639,6 +1641,7 @@ export class NodeLink {
1639
1641
  private _onSelectionChangedObserver;
1640
1642
  private _isVisible;
1641
1643
  private _isTargetCandidate;
1644
+ private _gradient;
1642
1645
  onDisposedObservable: Observable<NodeLink>;
1643
1646
  get isTargetCandidate(): boolean;
1644
1647
  set isTargetCandidate(value: boolean);
@@ -1674,6 +1677,7 @@ import { NodeLink } from "babylonjs-node-render-graph-editor/nodeGraphSystem/nod
1674
1677
  import { StateManager } from "babylonjs-node-render-graph-editor/nodeGraphSystem/stateManager";
1675
1678
  import { INodeData } from "babylonjs-node-render-graph-editor/nodeGraphSystem/interfaces/nodeData";
1676
1679
  import { IPortData } from "babylonjs-node-render-graph-editor/nodeGraphSystem/interfaces/portData";
1680
+ import { IEditablePropertyOption } from "babylonjs/Decorators/nodeDecorator";
1677
1681
  export class GraphNode {
1678
1682
  content: INodeData;
1679
1683
  private _visual;
@@ -1751,7 +1755,7 @@ export class GraphNode {
1751
1755
  private _onUp;
1752
1756
  private _onMove;
1753
1757
  renderProperties(): Nullable<JSX.Element>;
1754
- private _forceRebuild;
1758
+ _forceRebuild(source: any, propertyName: string, notifiers?: IEditablePropertyOption["notifiers"]): void;
1755
1759
  private _isCollapsed;
1756
1760
  /**
1757
1761
  * Collapse the node
@@ -2142,6 +2146,32 @@ export enum PortDataDirection {
2142
2146
  /** Output */
2143
2147
  Output = 1
2144
2148
  }
2149
+ export enum PortDirectValueTypes {
2150
+ Float = 0,
2151
+ Int = 1
2152
+ }
2153
+ export interface IPortDirectValueDefinition {
2154
+ /**
2155
+ * Gets the source object
2156
+ */
2157
+ source: any;
2158
+ /**
2159
+ * Gets the property name used to store the value
2160
+ */
2161
+ propertyName: string;
2162
+ /**
2163
+ * Gets or sets the min value accepted for this point if nothing is connected
2164
+ */
2165
+ valueMin: Nullable<any>;
2166
+ /**
2167
+ * Gets or sets the max value accepted for this point if nothing is connected
2168
+ */
2169
+ valueMax: Nullable<any>;
2170
+ /**
2171
+ * Gets or sets the type of the value
2172
+ */
2173
+ valueType: PortDirectValueTypes;
2174
+ }
2145
2175
  export interface IPortData {
2146
2176
  data: any;
2147
2177
  name: string;
@@ -2155,6 +2185,7 @@ export interface IPortData {
2155
2185
  needDualDirectionValidation: boolean;
2156
2186
  hasEndpoints: boolean;
2157
2187
  endpoints: Nullable<IPortData[]>;
2188
+ directValueDefinition?: IPortDirectValueDefinition;
2158
2189
  updateDisplayName: (newName: string) => void;
2159
2190
  canConnectTo: (port: IPortData) => boolean;
2160
2191
  connectTo: (port: IPortData) => void;
@@ -5605,6 +5636,7 @@ declare module BABYLON.NodeRenderGraphEditor {
5605
5636
  declare module BABYLON.NodeRenderGraphEditor.SharedUIComponents {
5606
5637
  export const IsFramePortData: (variableToCheck: any) => variableToCheck is BABYLON.NodeRenderGraphEditor.SharedUIComponents.FramePortData;
5607
5638
  export const RefreshNode: (node: BABYLON.NodeRenderGraphEditor.SharedUIComponents.GraphNode, visitedNodes?: Set<BABYLON.NodeRenderGraphEditor.SharedUIComponents.GraphNode>, visitedLinks?: Set<BABYLON.NodeRenderGraphEditor.SharedUIComponents.NodeLink>, canvas?: BABYLON.NodeRenderGraphEditor.SharedUIComponents.GraphCanvasComponent) => void;
5639
+ export const BuildFloatUI: (container: HTMLDivElement, document: Document, displayName: string, isInteger: boolean, source: any, propertyName: string, onChange: () => void, min?: number, max?: number, visualPropertiesRefresh?: Array<() => void>) => void;
5608
5640
 
5609
5641
 
5610
5642
 
@@ -5719,7 +5751,7 @@ declare module BABYLON.NodeRenderGraphEditor {
5719
5751
  }
5720
5752
  declare module BABYLON.NodeRenderGraphEditor.SharedUIComponents {
5721
5753
  export class NodePort {
5722
- portData: BABYLON.NodeRenderGraphEditor.SharedUIComponents.IPortData;
5754
+ portData: IPortData;
5723
5755
  node: BABYLON.NodeRenderGraphEditor.SharedUIComponents.GraphNode;
5724
5756
  protected _element: HTMLDivElement;
5725
5757
  protected _portContainer: HTMLElement;
@@ -5730,6 +5762,7 @@ declare module BABYLON.NodeRenderGraphEditor.SharedUIComponents {
5730
5762
  protected _onCandidateLinkMovedObserver: BABYLON.Nullable<BABYLON.Observer<BABYLON.Nullable<BABYLON.Vector2>>>;
5731
5763
  protected _onSelectionChangedObserver: BABYLON.Nullable<BABYLON.Observer<BABYLON.Nullable<BABYLON.NodeRenderGraphEditor.SharedUIComponents.ISelectionChangedOptions>>>;
5732
5764
  protected _exposedOnFrame: boolean;
5765
+ protected _portUIcontainer?: HTMLDivElement;
5733
5766
  delegatedPort: BABYLON.Nullable<BABYLON.NodeRenderGraphEditor.SharedUIComponents.FrameNodePort>;
5734
5767
  get element(): HTMLDivElement;
5735
5768
  get container(): HTMLElement;
@@ -5743,9 +5776,9 @@ declare module BABYLON.NodeRenderGraphEditor.SharedUIComponents {
5743
5776
  set exposedPortPosition(value: number);
5744
5777
  private _isConnectedToNodeOutsideOfFrame;
5745
5778
  refresh(): void;
5746
- constructor(portContainer: HTMLElement, portData: BABYLON.NodeRenderGraphEditor.SharedUIComponents.IPortData, node: BABYLON.NodeRenderGraphEditor.SharedUIComponents.GraphNode, stateManager: BABYLON.NodeRenderGraphEditor.SharedUIComponents.StateManager);
5779
+ constructor(portContainer: HTMLElement, portData: IPortData, node: BABYLON.NodeRenderGraphEditor.SharedUIComponents.GraphNode, stateManager: BABYLON.NodeRenderGraphEditor.SharedUIComponents.StateManager, portUIcontainer?: HTMLDivElement);
5747
5780
  dispose(): void;
5748
- static CreatePortElement(portData: BABYLON.NodeRenderGraphEditor.SharedUIComponents.IPortData, node: BABYLON.NodeRenderGraphEditor.SharedUIComponents.GraphNode, root: HTMLElement, displayManager: BABYLON.Nullable<BABYLON.NodeRenderGraphEditor.SharedUIComponents.IDisplayManager>, stateManager: BABYLON.NodeRenderGraphEditor.SharedUIComponents.StateManager): NodePort;
5781
+ static CreatePortElement(portData: IPortData, node: BABYLON.NodeRenderGraphEditor.SharedUIComponents.GraphNode, root: HTMLElement, displayManager: BABYLON.Nullable<BABYLON.NodeRenderGraphEditor.SharedUIComponents.IDisplayManager>, stateManager: BABYLON.NodeRenderGraphEditor.SharedUIComponents.StateManager): NodePort;
5749
5782
  }
5750
5783
 
5751
5784
 
@@ -5767,6 +5800,7 @@ declare module BABYLON.NodeRenderGraphEditor.SharedUIComponents {
5767
5800
  private _onSelectionChangedObserver;
5768
5801
  private _isVisible;
5769
5802
  private _isTargetCandidate;
5803
+ private _gradient;
5770
5804
  onDisposedObservable: BABYLON.Observable<NodeLink>;
5771
5805
  get isTargetCandidate(): boolean;
5772
5806
  set isTargetCandidate(value: boolean);
@@ -5883,7 +5917,7 @@ declare module BABYLON.NodeRenderGraphEditor.SharedUIComponents {
5883
5917
  private _onUp;
5884
5918
  private _onMove;
5885
5919
  renderProperties(): BABYLON.Nullable<JSX.Element>;
5886
- private _forceRebuild;
5920
+ _forceRebuild(source: any, propertyName: string, notifiers?: BABYLON.IEditablePropertyOption["notifiers"]): void;
5887
5921
  private _isCollapsed;
5888
5922
  /**
5889
5923
  * Collapse the node
@@ -6288,6 +6322,32 @@ declare module BABYLON.NodeRenderGraphEditor.SharedUIComponents {
6288
6322
  /** Output */
6289
6323
  Output = 1
6290
6324
  }
6325
+ export enum PortDirectValueTypes {
6326
+ Float = 0,
6327
+ Int = 1
6328
+ }
6329
+ export interface IPortDirectValueDefinition {
6330
+ /**
6331
+ * Gets the source object
6332
+ */
6333
+ source: any;
6334
+ /**
6335
+ * Gets the property name used to store the value
6336
+ */
6337
+ propertyName: string;
6338
+ /**
6339
+ * Gets or sets the min value accepted for this point if nothing is connected
6340
+ */
6341
+ valueMin: BABYLON.Nullable<any>;
6342
+ /**
6343
+ * Gets or sets the max value accepted for this point if nothing is connected
6344
+ */
6345
+ valueMax: BABYLON.Nullable<any>;
6346
+ /**
6347
+ * Gets or sets the type of the value
6348
+ */
6349
+ valueType: PortDirectValueTypes;
6350
+ }
6291
6351
  export interface IPortData {
6292
6352
  data: any;
6293
6353
  name: string;
@@ -6301,6 +6361,7 @@ declare module BABYLON.NodeRenderGraphEditor.SharedUIComponents {
6301
6361
  needDualDirectionValidation: boolean;
6302
6362
  hasEndpoints: boolean;
6303
6363
  endpoints: BABYLON.Nullable<IPortData[]>;
6364
+ directValueDefinition?: IPortDirectValueDefinition;
6304
6365
  updateDisplayName: (newName: string) => void;
6305
6366
  canConnectTo: (port: IPortData) => boolean;
6306
6367
  connectTo: (port: IPortData) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "babylonjs-node-render-graph-editor",
3
- "version": "7.24.1",
3
+ "version": "7.25.0",
4
4
  "main": "babylon.nodeRenderGraphEditor.js",
5
5
  "types": "babylon.nodeRenderGraphEditor.module.d.ts",
6
6
  "files": [
@@ -14,7 +14,7 @@
14
14
  "clean": "rimraf dist && rimraf babylon*.*"
15
15
  },
16
16
  "dependencies": {
17
- "babylonjs": "^7.35.1"
17
+ "babylonjs": "^7.36.0"
18
18
  },
19
19
  "devDependencies": {
20
20
  "@dev/build-tools": "1.0.0",