@babylonjs/node-editor 5.13.0 → 5.13.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.
|
@@ -63182,7 +63182,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
63182
63182
|
|
|
63183
63183
|
class FrameNodePort extends _nodePort__WEBPACK_IMPORTED_MODULE_1__.NodePort {
|
|
63184
63184
|
constructor(portContainer, portData, node, stateManager, isInput, framePortId, parentFrameId) {
|
|
63185
|
-
super(portContainer, portData
|
|
63185
|
+
super(portContainer, portData, node, stateManager);
|
|
63186
63186
|
this.portData = portData;
|
|
63187
63187
|
this.node = node;
|
|
63188
63188
|
this._onFramePortPositionChangedObservable = new core_Misc_observable__WEBPACK_IMPORTED_MODULE_0__.Observable();
|
|
@@ -63517,13 +63517,12 @@ class GraphCanvasComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component
|
|
|
63517
63517
|
if (this._nodeDataContentList.indexOf(nodeData.data) !== -1) {
|
|
63518
63518
|
return this.nodes.filter((n) => n.content.data === nodeData.data)[0];
|
|
63519
63519
|
}
|
|
63520
|
-
this._nodeDataContentList.push(nodeData.data);
|
|
63521
63520
|
onNodeCreated(nodeData.data);
|
|
63522
63521
|
// Connections
|
|
63523
63522
|
if (nodeData.inputs.length) {
|
|
63524
63523
|
for (const input of nodeData.inputs) {
|
|
63525
63524
|
if (input.connectedPort && recursion) {
|
|
63526
|
-
this.createNodeFromObject(_typeLedger__WEBPACK_IMPORTED_MODULE_11__.TypeLedger.NodeDataBuilder(input.connectedPort, this), onNodeCreated);
|
|
63525
|
+
this.createNodeFromObject(_typeLedger__WEBPACK_IMPORTED_MODULE_11__.TypeLedger.NodeDataBuilder(input.connectedPort.ownerData, this), onNodeCreated);
|
|
63527
63526
|
}
|
|
63528
63527
|
}
|
|
63529
63528
|
}
|
|
@@ -63625,10 +63624,11 @@ class GraphCanvasComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component
|
|
|
63625
63624
|
}
|
|
63626
63625
|
link.dispose();
|
|
63627
63626
|
}
|
|
63628
|
-
appendNode(
|
|
63629
|
-
const newNode = new _graphNode__WEBPACK_IMPORTED_MODULE_2__.GraphNode(
|
|
63627
|
+
appendNode(nodeData) {
|
|
63628
|
+
const newNode = new _graphNode__WEBPACK_IMPORTED_MODULE_2__.GraphNode(nodeData, this.props.stateManager);
|
|
63630
63629
|
newNode.appendVisual(this._graphCanvas, this);
|
|
63631
63630
|
this._nodes.push(newNode);
|
|
63631
|
+
this._nodeDataContentList.push(nodeData.data);
|
|
63632
63632
|
return newNode;
|
|
63633
63633
|
}
|
|
63634
63634
|
distributeGraph() {
|
|
@@ -64777,13 +64777,15 @@ class GraphFrame {
|
|
|
64777
64777
|
for (let i = 0; i < this._exposedOutPorts.length;) {
|
|
64778
64778
|
// Output
|
|
64779
64779
|
const port = this._exposedOutPorts[i];
|
|
64780
|
-
if (port
|
|
64781
|
-
if (
|
|
64782
|
-
|
|
64783
|
-
|
|
64784
|
-
|
|
64785
|
-
|
|
64786
|
-
|
|
64780
|
+
if (port) {
|
|
64781
|
+
if (port.node === null || port.node.enclosingFrameId != this.id) {
|
|
64782
|
+
if (this._removePortFromExposedWithNode(port, this._exposedOutPorts))
|
|
64783
|
+
continue;
|
|
64784
|
+
}
|
|
64785
|
+
else {
|
|
64786
|
+
if (!this._createOutputPorts(port, port.node) && this._removePortFromExposedWithNode(port, this._exposedOutPorts)) {
|
|
64787
|
+
continue;
|
|
64788
|
+
}
|
|
64787
64789
|
}
|
|
64788
64790
|
}
|
|
64789
64791
|
++i;
|
|
@@ -69866,12 +69868,16 @@ class BlockNodeData {
|
|
|
69866
69868
|
this.data = data;
|
|
69867
69869
|
this._inputs = [];
|
|
69868
69870
|
this._outputs = [];
|
|
69869
|
-
|
|
69870
|
-
this.
|
|
69871
|
-
|
|
69872
|
-
|
|
69873
|
-
|
|
69874
|
-
|
|
69871
|
+
if (data.inputs) {
|
|
69872
|
+
this.data.inputs.forEach((input) => {
|
|
69873
|
+
this._inputs.push(new _connectionPointPortData__WEBPACK_IMPORTED_MODULE_0__.ConnectionPointPortData(input, nodeContainer));
|
|
69874
|
+
});
|
|
69875
|
+
}
|
|
69876
|
+
if (data.outputs) {
|
|
69877
|
+
this.data.outputs.forEach((output) => {
|
|
69878
|
+
this._outputs.push(new _connectionPointPortData__WEBPACK_IMPORTED_MODULE_0__.ConnectionPointPortData(output, nodeContainer));
|
|
69879
|
+
});
|
|
69880
|
+
}
|
|
69875
69881
|
}
|
|
69876
69882
|
get uniqueId() {
|
|
69877
69883
|
return this.data.uniqueId;
|
|
@@ -69938,6 +69944,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
69938
69944
|
/* harmony import */ var core_Materials_Node_nodeMaterialBlockConnectionPoint__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/Materials/Node/nodeMaterialBlockConnectionPoint */ "core/Misc/dataStorage");
|
|
69939
69945
|
/* harmony import */ var core_Materials_Node_nodeMaterialBlockConnectionPoint__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_Materials_Node_nodeMaterialBlockConnectionPoint__WEBPACK_IMPORTED_MODULE_0__);
|
|
69940
69946
|
/* harmony import */ var shared_ui_components_nodeGraphSystem_interfaces_portData__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! shared-ui-components/nodeGraphSystem/interfaces/portData */ "../../../dev/sharedUiComponents/dist/nodeGraphSystem/interfaces/portData.js");
|
|
69947
|
+
/* harmony import */ var shared_ui_components_nodeGraphSystem_typeLedger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! shared-ui-components/nodeGraphSystem/typeLedger */ "../../../dev/sharedUiComponents/dist/nodeGraphSystem/typeLedger.js");
|
|
69948
|
+
|
|
69941
69949
|
|
|
69942
69950
|
|
|
69943
69951
|
class ConnectionPointPortData {
|
|
@@ -69978,10 +69986,11 @@ class ConnectionPointPortData {
|
|
|
69978
69986
|
}
|
|
69979
69987
|
if (!this._connectedPort) {
|
|
69980
69988
|
const otherBlock = this.data.connectedPoint.ownerBlock;
|
|
69981
|
-
|
|
69982
|
-
if (otherNode) {
|
|
69983
|
-
|
|
69989
|
+
let otherNode = this._nodeContainer.nodes.find((n) => n.content.data === otherBlock);
|
|
69990
|
+
if (!otherNode) {
|
|
69991
|
+
otherNode = this._nodeContainer.appendNode(shared_ui_components_nodeGraphSystem_typeLedger__WEBPACK_IMPORTED_MODULE_2__.TypeLedger.NodeDataBuilder(otherBlock, this._nodeContainer));
|
|
69984
69992
|
}
|
|
69993
|
+
this._connectedPort = otherNode.getPortDataForPortDataContent(this.data.connectedPoint);
|
|
69985
69994
|
}
|
|
69986
69995
|
return this._connectedPort;
|
|
69987
69996
|
}
|