@babylonjs/node-editor 6.19.1 → 6.20.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.
@@ -54992,24 +54992,25 @@ class NodeLink {
54992
54992
  }
54993
54993
  onClick(evt) {
54994
54994
  const stateManager = this._graphCanvas.stateManager;
54995
+ const nodeA = this._nodeA;
54996
+ const pointA = this._portA.portData;
54997
+ const nodeB = this._nodeB;
54998
+ const pointB = this._portB.portData;
54999
+ const reconnect = (newNode) => {
55000
+ const newBlock = newNode.content.data;
55001
+ // Delete previous link
55002
+ this.dispose();
55003
+ // Connect to the new block
55004
+ this._graphCanvas.connectNodes(nodeA, pointA, newNode, newNode.getPortDataForPortDataContent(newBlock.input));
55005
+ this._graphCanvas.connectNodes(newNode, newNode.getPortDataForPortDataContent(newBlock.output), nodeB, pointB);
55006
+ stateManager.onRebuildRequiredObservable.notifyObservers();
55007
+ };
54995
55008
  if (evt.altKey) {
54996
- const nodeA = this._nodeA;
54997
- const pointA = this._portA.portData;
54998
- const nodeB = this._nodeB;
54999
- const pointB = this._portB.portData;
55000
55009
  if (!stateManager.isElbowConnectionAllowed(this._portA, this._portB)) {
55001
55010
  return;
55002
55011
  }
55003
55012
  // Create an elbow at the clicked location
55004
- stateManager.onNewNodeCreatedObservable.addOnce((newNode) => {
55005
- const newElbowBlock = newNode.content.data;
55006
- // Delete previous link
55007
- this.dispose();
55008
- // Connect to Elbow block
55009
- this._graphCanvas.connectNodes(nodeA, pointA, newNode, newNode.getPortDataForPortDataContent(newElbowBlock.input));
55010
- this._graphCanvas.connectNodes(newNode, newNode.getPortDataForPortDataContent(newElbowBlock.output), nodeB, pointB);
55011
- stateManager.onRebuildRequiredObservable.notifyObservers();
55012
- });
55013
+ stateManager.onNewNodeCreatedObservable.addOnce(reconnect);
55013
55014
  stateManager.onNewBlockRequiredObservable.notifyObservers({
55014
55015
  type: "ElbowBlock",
55015
55016
  targetX: evt.clientX,
@@ -55018,6 +55019,20 @@ class NodeLink {
55018
55019
  });
55019
55020
  return;
55020
55021
  }
55022
+ if (evt.ctrlKey) {
55023
+ if (!stateManager.isDebugConnectionAllowed(this._portA, this._portB)) {
55024
+ return;
55025
+ }
55026
+ // Create a debug at the clicked location
55027
+ stateManager.onNewNodeCreatedObservable.addOnce(reconnect);
55028
+ stateManager.onNewBlockRequiredObservable.notifyObservers({
55029
+ type: "DebugBlock",
55030
+ targetX: evt.clientX,
55031
+ targetY: evt.clientY,
55032
+ needRepositioning: true,
55033
+ });
55034
+ return;
55035
+ }
55021
55036
  stateManager.onSelectionChangedObservable.notifyObservers({ selection: this });
55022
55037
  }
55023
55038
  dispose(notify = true) {
@@ -58364,6 +58379,8 @@ __webpack_require__.r(__webpack_exports__);
58364
58379
  /* harmony import */ var shared_ui_components_nodeGraphSystem_stateManager__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! shared-ui-components/nodeGraphSystem/stateManager */ "../../../dev/sharedUiComponents/dist/nodeGraphSystem/stateManager.js");
58365
58380
  /* harmony import */ var _graphSystem_registerDefaultInput__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./graphSystem/registerDefaultInput */ "../../../tools/nodeEditor/dist/graphSystem/registerDefaultInput.js");
58366
58381
  /* harmony import */ var _graphSystem_registerExportData__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./graphSystem/registerExportData */ "../../../tools/nodeEditor/dist/graphSystem/registerExportData.js");
58382
+ /* harmony import */ var _graphSystem_registerDebugSupport__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./graphSystem/registerDebugSupport */ "../../../tools/nodeEditor/dist/graphSystem/registerDebugSupport.js");
58383
+
58367
58384
 
58368
58385
 
58369
58386
 
@@ -58420,6 +58437,7 @@ class GlobalState {
58420
58437
  this.stateManager.data = this;
58421
58438
  this.stateManager.lockObject = this.lockObject;
58422
58439
  (0,_graphSystem_registerElbowSupport__WEBPACK_IMPORTED_MODULE_2__.RegisterElbowSupport)(this.stateManager);
58440
+ (0,_graphSystem_registerDebugSupport__WEBPACK_IMPORTED_MODULE_8__.RegisterDebugSupport)(this.stateManager);
58423
58441
  (0,_graphSystem_registerNodePortDesign__WEBPACK_IMPORTED_MODULE_3__.RegisterNodePortDesign)(this.stateManager);
58424
58442
  (0,_graphSystem_registerDefaultInput__WEBPACK_IMPORTED_MODULE_6__.RegisterDefaultInput)(this.stateManager);
58425
58443
  (0,_graphSystem_registerExportData__WEBPACK_IMPORTED_MODULE_7__.RegisterExportData)(this.stateManager);
@@ -61791,6 +61809,26 @@ class VectorMergerPropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1_
61791
61809
  }
61792
61810
 
61793
61811
 
61812
+ /***/ }),
61813
+
61814
+ /***/ "../../../tools/nodeEditor/dist/graphSystem/registerDebugSupport.js":
61815
+ /*!**************************************************************************!*\
61816
+ !*** ../../../tools/nodeEditor/dist/graphSystem/registerDebugSupport.js ***!
61817
+ \**************************************************************************/
61818
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
61819
+
61820
+ "use strict";
61821
+ __webpack_require__.r(__webpack_exports__);
61822
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
61823
+ /* harmony export */ RegisterDebugSupport: () => (/* binding */ RegisterDebugSupport)
61824
+ /* harmony export */ });
61825
+ const RegisterDebugSupport = (stateManager) => {
61826
+ stateManager.isDebugConnectionAllowed = (a, b) => {
61827
+ return false; // No debug node in NME
61828
+ };
61829
+ };
61830
+
61831
+
61794
61832
  /***/ }),
61795
61833
 
61796
61834
  /***/ "../../../tools/nodeEditor/dist/graphSystem/registerDefaultInput.js":