@babylonjs/node-geometry-editor 7.53.2 → 7.54.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.
@@ -261,11 +261,12 @@ import { AggregatorBlock } from "@babylonjs/core/Meshes/Node/Blocks/Set/aggregat
261
261
  import { CleanGeometryBlock } from "@babylonjs/core/Meshes/Node/Blocks/cleanGeometryBlock";
262
262
  import { PointListBlock } from "@babylonjs/core/Meshes/Node/Blocks/Sources/pointListBlock";
263
263
  import { SubdivideBlock } from "@babylonjs/core/Meshes/Node/Blocks/subdivideBlock";
264
+ import { GeometryEaseBlock } from "@babylonjs/core/Meshes/Node/Blocks/geometryEaseBlock";
264
265
  /**
265
266
  * Static class for BlockTools
266
267
  */
267
268
  export class BlockTools {
268
- static GetBlockFromString(data: string): SubdivideBlock | PointListBlock | CleanGeometryBlock | AggregatorBlock | LatticeBlock | GeometryInterceptorBlock | GeometryRotate2dBlock | GeometryLengthBlock | GeometryDistanceBlock | GeometryDotBlock | GeometryPosterizeBlock | GeometryReplaceColorBlock | GeometryDesaturateBlock | GeometryCurveBlock | GeometryCrossBlock | GeometryClampBlock | BooleanGeometryBlock | GeometryTextureFetchBlock | GeometryTextureBlock | BoundingBlock | MatrixComposeBlock | GeometryInfoBlock | GeometryCollectionBlock | GeometryOptimizeBlock | NullBlock | TeleportInBlock | TeleportOutBlock | DebugBlock | IntFloatConverterBlock | ConditionBlock | GeometryLerpBlock | GeometryNLerpBlock | GeometrySmoothStepBlock | GeometryStepBlock | MappingBlock | SetMaterialIDBlock | InstantiateOnVolumeBlock | InstantiateOnFacesBlock | InstantiateOnVerticesBlock | InstantiateBlock | MapRangeBlock | NormalizeVectorBlock | MeshBlock | VectorConverterBlock | TranslationBlock | ScalingBlock | AlignBlock | RotationXBlock | RotationYBlock | RotationZBlock | ComputeNormalsBlock | SetPositionsBlock | SetNormalsBlock | SetColorsBlock | SetTangentsBlock | SetUVsBlock | NoiseBlock | RandomBlock | GeometryOutputBlock | GridBlock | DiscBlock | IcoSphereBlock | BoxBlock | TorusBlock | SphereBlock | CylinderBlock | CapsuleBlock | PlaneBlock | GeometryElbowBlock | MergeGeometryBlock | GeometryTransformBlock | GeometryModBlock | GeometryPowBlock | GeometryInputBlock | MathBlock | GeometryTrigonometryBlock | GeometryArcTan2Block | InstantiateLinearBlock | InstantiateRadialBlock | null;
269
+ static GetBlockFromString(data: string): GeometryEaseBlock | SubdivideBlock | PointListBlock | CleanGeometryBlock | AggregatorBlock | LatticeBlock | GeometryInterceptorBlock | GeometryRotate2dBlock | GeometryLengthBlock | GeometryDistanceBlock | GeometryDotBlock | GeometryPosterizeBlock | GeometryReplaceColorBlock | GeometryDesaturateBlock | GeometryCurveBlock | GeometryCrossBlock | GeometryClampBlock | BooleanGeometryBlock | GeometryTextureFetchBlock | GeometryTextureBlock | BoundingBlock | MatrixComposeBlock | GeometryInfoBlock | GeometryCollectionBlock | GeometryOptimizeBlock | NullBlock | TeleportInBlock | TeleportOutBlock | DebugBlock | IntFloatConverterBlock | ConditionBlock | GeometryLerpBlock | GeometryNLerpBlock | GeometrySmoothStepBlock | GeometryStepBlock | MappingBlock | SetMaterialIDBlock | InstantiateOnVolumeBlock | InstantiateOnFacesBlock | InstantiateOnVerticesBlock | InstantiateBlock | MapRangeBlock | NormalizeVectorBlock | MeshBlock | VectorConverterBlock | TranslationBlock | ScalingBlock | AlignBlock | RotationXBlock | RotationYBlock | RotationZBlock | ComputeNormalsBlock | SetPositionsBlock | SetNormalsBlock | SetColorsBlock | SetTangentsBlock | SetUVsBlock | NoiseBlock | RandomBlock | GeometryOutputBlock | GridBlock | DiscBlock | IcoSphereBlock | BoxBlock | TorusBlock | SphereBlock | CylinderBlock | CapsuleBlock | PlaneBlock | GeometryElbowBlock | MergeGeometryBlock | GeometryTransformBlock | GeometryModBlock | GeometryPowBlock | GeometryInputBlock | MathBlock | GeometryTrigonometryBlock | GeometryArcTan2Block | InstantiateLinearBlock | InstantiateRadialBlock | null;
269
270
  static GetColorFromConnectionNodeType(type: NodeGeometryBlockConnectionPointTypes): string;
270
271
  static GetConnectionNodeTypeFromString(type: string): NodeGeometryBlockConnectionPointTypes.Int | NodeGeometryBlockConnectionPointTypes.Float | NodeGeometryBlockConnectionPointTypes.Vector2 | NodeGeometryBlockConnectionPointTypes.Vector3 | NodeGeometryBlockConnectionPointTypes.Vector4 | NodeGeometryBlockConnectionPointTypes.Matrix | NodeGeometryBlockConnectionPointTypes.AutoDetect;
271
272
  static GetStringFromConnectionNodeType(type: NodeGeometryBlockConnectionPointTypes): "" | "Int" | "Float" | "Vector2" | "Vector3" | "Vector4" | "Matrix";
@@ -1598,7 +1599,17 @@ import { NodeLink } from "@babylonjs/node-geometry-editor/nodeGraphSystem/nodeLi
1598
1599
  import { FramePortData } from "@babylonjs/node-geometry-editor/nodeGraphSystem/types/framePortData";
1599
1600
  export const IsFramePortData: (variableToCheck: any) => variableToCheck is FramePortData;
1600
1601
  export const RefreshNode: (node: GraphNode, visitedNodes?: Set<GraphNode>, visitedLinks?: Set<NodeLink>, canvas?: GraphCanvasComponent) => void;
1601
- 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;
1602
+ export const BuildFloatUI: (container: HTMLDivElement, document: Document, displayName: string, isInteger: boolean, source: any, propertyName: string, onChange: () => void, min?: number, max?: number, visualPropertiesRefresh?: Array<() => void>, additionalClassName?: string) => void;
1603
+ export function GetListOfAcceptedTypes<T extends Record<string, string | number>>(types: T, allValue: number, autoDetectValue: number, port: {
1604
+ acceptedConnectionPointTypes: number[];
1605
+ excludedConnectionPointTypes: number[];
1606
+ type: number;
1607
+ }, skips?: number[]): string[];
1608
+ export function GetConnectionErrorMessage<T extends Record<string, string | number>>(sourceType: number, types: T, allValue: number, autoDetectValue: number, port: {
1609
+ acceptedConnectionPointTypes: number[];
1610
+ excludedConnectionPointTypes: number[];
1611
+ type: number;
1612
+ }, skips?: number[]): string;
1602
1613
 
1603
1614
  }
1604
1615
  declare module "@babylonjs/node-geometry-editor/nodeGraphSystem/stateManager" {
@@ -1653,7 +1664,7 @@ export class StateManager {
1653
1664
  exportData: (data: any, frame?: Nullable<GraphFrame>) => string;
1654
1665
  isElbowConnectionAllowed: (nodeA: FrameNodePort | NodePort, nodeB: FrameNodePort | NodePort) => boolean;
1655
1666
  isDebugConnectionAllowed: (nodeA: FrameNodePort | NodePort, nodeB: FrameNodePort | NodePort) => boolean;
1656
- applyNodePortDesign: (data: IPortData, element: HTMLElement, img: HTMLImageElement, pip: HTMLDivElement) => void;
1667
+ applyNodePortDesign: (data: IPortData, element: HTMLElement, imgHost: HTMLDivElement, pip: HTMLDivElement) => boolean;
1657
1668
  getPortColor: (portData: IPortData) => string;
1658
1669
  storeEditorData: (serializationObject: any, frame?: Nullable<GraphFrame>) => void;
1659
1670
  getEditorDataMap: () => {
@@ -1723,7 +1734,7 @@ export class NodePort {
1723
1734
  node: GraphNode;
1724
1735
  protected _element: HTMLDivElement;
1725
1736
  protected _portContainer: HTMLElement;
1726
- protected _img: HTMLImageElement;
1737
+ protected _imgHost: HTMLDivElement;
1727
1738
  protected _pip: HTMLDivElement;
1728
1739
  protected _stateManager: StateManager;
1729
1740
  protected _portLabelElement: Element;
@@ -1806,6 +1817,7 @@ import { IPortData } from "@babylonjs/node-geometry-editor/nodeGraphSystem/inter
1806
1817
  import { IEditablePropertyOption } from "@babylonjs/core/Decorators/nodeDecorator";
1807
1818
  export class GraphNode {
1808
1819
  content: INodeData;
1820
+ private static _IdGenerator;
1809
1821
  private _visual;
1810
1822
  private _headerContainer;
1811
1823
  private _headerIcon;
@@ -1837,11 +1849,11 @@ export class GraphNode {
1837
1849
  private _onUpdateRequiredObserver;
1838
1850
  private _onHighlightNodeObserver;
1839
1851
  private _ownerCanvas;
1840
- private _isSelected;
1841
1852
  private _displayManager;
1842
1853
  private _isVisible;
1843
1854
  private _enclosingFrameId;
1844
1855
  private _visualPropertiesRefresh;
1856
+ private _lastClick;
1845
1857
  addClassToVisual(className: string): void;
1846
1858
  removeClassFromVisual(className: string): void;
1847
1859
  get isCollapsed(): boolean;
@@ -1861,10 +1873,8 @@ export class GraphNode {
1861
1873
  get height(): number;
1862
1874
  get id(): number;
1863
1875
  get name(): string;
1864
- get isSelected(): boolean;
1865
1876
  get enclosingFrameId(): number;
1866
1877
  set enclosingFrameId(value: number);
1867
- set isSelected(value: boolean);
1868
1878
  setIsSelected(value: boolean, marqueeSelection: boolean): void;
1869
1879
  get rootElement(): HTMLDivElement;
1870
1880
  constructor(content: INodeData, stateManager: StateManager);
@@ -1876,10 +1886,11 @@ export class GraphNode {
1876
1886
  private _refreshFrames;
1877
1887
  _refreshLinks(): void;
1878
1888
  refresh(): void;
1889
+ private _expand;
1890
+ private _searchMiddle;
1879
1891
  private _onDown;
1880
1892
  cleanAccumulation(useCeil?: boolean): void;
1881
1893
  private _onUp;
1882
- private _attach;
1883
1894
  private _onMove;
1884
1895
  renderProperties(): Nullable<JSX.Element>;
1885
1896
  _forceRebuild(source: any, propertyName: string, notifiers?: IEditablePropertyOption["notifiers"]): void;
@@ -2103,6 +2114,8 @@ export class GraphCanvasComponent extends React.Component<IGraphCanvasComponentP
2103
2114
  private _candidateLinkedHasMoved;
2104
2115
  private _x;
2105
2116
  private _y;
2117
+ private _lastx;
2118
+ private _lasty;
2106
2119
  private _zoom;
2107
2120
  private _selectedNodes;
2108
2121
  private _selectedLink;
@@ -2116,6 +2129,7 @@ export class GraphCanvasComponent extends React.Component<IGraphCanvasComponentP
2116
2129
  private _frames;
2117
2130
  private _nodeDataContentList;
2118
2131
  private _altKeyIsPressed;
2132
+ private _shiftKeyIsPressed;
2119
2133
  private _multiKeyIsPressed;
2120
2134
  private _oldY;
2121
2135
  _frameIsMoving: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babylonjs/node-geometry-editor",
3
- "version": "7.53.2",
3
+ "version": "7.54.0",
4
4
  "main": "dist/babylon.nodeGeometryEditor.max.js",
5
5
  "module": "dist/babylon.nodeGeometryEditor.max.js",
6
6
  "esnext": "dist/babylon.nodeGeometryEditor.max.js",
@@ -23,7 +23,7 @@
23
23
  "@types/react-dom": ">=16.0.9"
24
24
  },
25
25
  "devDependencies": {
26
- "@babylonjs/core": "^7.53.2",
26
+ "@babylonjs/core": "^7.54.0",
27
27
  "react": "^17.0.2",
28
28
  "react-dom": "^17.0.2"
29
29
  },