@babylonjs/node-editor 5.13.0 → 5.13.3
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() {
|
|
@@ -64130,9 +64130,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
64130
64130
|
/* harmony import */ var core_Misc_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/Maths/math.color */ "core/Misc/dataStorage");
|
|
64131
64131
|
/* harmony import */ var core_Misc_observable__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_Misc_observable__WEBPACK_IMPORTED_MODULE_0__);
|
|
64132
64132
|
/* harmony import */ var _frameNodePort__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./frameNodePort */ "../../../dev/sharedUiComponents/dist/nodeGraphSystem/frameNodePort.js");
|
|
64133
|
-
/* harmony import */ var
|
|
64134
|
-
/* harmony import */ var _stringTools__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../stringTools */ "../../../dev/sharedUiComponents/dist/stringTools.js");
|
|
64135
|
-
|
|
64133
|
+
/* harmony import */ var _stringTools__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../stringTools */ "../../../dev/sharedUiComponents/dist/stringTools.js");
|
|
64136
64134
|
|
|
64137
64135
|
|
|
64138
64136
|
|
|
@@ -64719,7 +64717,7 @@ class GraphFrame {
|
|
|
64719
64717
|
return this._isCollapsed;
|
|
64720
64718
|
}
|
|
64721
64719
|
_createInputPort(port, node) {
|
|
64722
|
-
const localPort = _frameNodePort__WEBPACK_IMPORTED_MODULE_1__.FrameNodePort.CreateFrameNodePortElement(
|
|
64720
|
+
const localPort = _frameNodePort__WEBPACK_IMPORTED_MODULE_1__.FrameNodePort.CreateFrameNodePortElement(port.portData, node, this._inputPortContainer, null, this._ownerCanvas.stateManager, true, GraphFrame._FramePortCounter++, this.id);
|
|
64723
64721
|
this._frameInPorts.push(localPort);
|
|
64724
64722
|
port.delegatedPort = localPort;
|
|
64725
64723
|
this._controlledPorts.push(port);
|
|
@@ -64777,13 +64775,15 @@ class GraphFrame {
|
|
|
64777
64775
|
for (let i = 0; i < this._exposedOutPorts.length;) {
|
|
64778
64776
|
// Output
|
|
64779
64777
|
const port = this._exposedOutPorts[i];
|
|
64780
|
-
if (port
|
|
64781
|
-
if (
|
|
64782
|
-
|
|
64783
|
-
|
|
64784
|
-
|
|
64785
|
-
|
|
64786
|
-
|
|
64778
|
+
if (port) {
|
|
64779
|
+
if (port.node === null || port.node.enclosingFrameId != this.id) {
|
|
64780
|
+
if (this._removePortFromExposedWithNode(port, this._exposedOutPorts))
|
|
64781
|
+
continue;
|
|
64782
|
+
}
|
|
64783
|
+
else {
|
|
64784
|
+
if (!this._createOutputPorts(port, port.node) && this._removePortFromExposedWithNode(port, this._exposedOutPorts)) {
|
|
64785
|
+
continue;
|
|
64786
|
+
}
|
|
64787
64787
|
}
|
|
64788
64788
|
}
|
|
64789
64789
|
++i;
|
|
@@ -64887,7 +64887,7 @@ class GraphFrame {
|
|
|
64887
64887
|
let localPort;
|
|
64888
64888
|
if (!portAdded) {
|
|
64889
64889
|
portAdded = true;
|
|
64890
|
-
localPort = _frameNodePort__WEBPACK_IMPORTED_MODULE_1__.FrameNodePort.CreateFrameNodePortElement(
|
|
64890
|
+
localPort = _frameNodePort__WEBPACK_IMPORTED_MODULE_1__.FrameNodePort.CreateFrameNodePortElement(port.portData, link.nodeA, this._outputPortContainer, null, this._ownerCanvas.stateManager, false, GraphFrame._FramePortCounter++, this.id);
|
|
64891
64891
|
this._frameOutPorts.push(localPort);
|
|
64892
64892
|
link.isVisible = true;
|
|
64893
64893
|
const onLinkDisposedObserver = link.onDisposedObservable.add((nodeLink) => {
|
|
@@ -64908,7 +64908,7 @@ class GraphFrame {
|
|
|
64908
64908
|
this._controlledPorts.push(port);
|
|
64909
64909
|
}
|
|
64910
64910
|
else if (port.exposedPortPosition >= 0 && !portAdded) {
|
|
64911
|
-
const localPort = _frameNodePort__WEBPACK_IMPORTED_MODULE_1__.FrameNodePort.CreateFrameNodePortElement(
|
|
64911
|
+
const localPort = _frameNodePort__WEBPACK_IMPORTED_MODULE_1__.FrameNodePort.CreateFrameNodePortElement(port.portData, node, this._outputPortContainer, null, this._ownerCanvas.stateManager, false, GraphFrame._FramePortCounter++, this.id);
|
|
64912
64912
|
this._frameOutPorts.push(localPort);
|
|
64913
64913
|
port.delegatedPort = localPort;
|
|
64914
64914
|
this._controlledPorts.push(port);
|
|
@@ -64919,7 +64919,7 @@ class GraphFrame {
|
|
|
64919
64919
|
return true;
|
|
64920
64920
|
}
|
|
64921
64921
|
else if (port.exposedOnFrame) {
|
|
64922
|
-
const localPort = _frameNodePort__WEBPACK_IMPORTED_MODULE_1__.FrameNodePort.CreateFrameNodePortElement(
|
|
64922
|
+
const localPort = _frameNodePort__WEBPACK_IMPORTED_MODULE_1__.FrameNodePort.CreateFrameNodePortElement(port.portData, node, this._outputPortContainer, null, this._ownerCanvas.stateManager, false, GraphFrame._FramePortCounter++, this.id);
|
|
64923
64923
|
this._frameOutPorts.push(localPort);
|
|
64924
64924
|
port.delegatedPort = localPort;
|
|
64925
64925
|
this._controlledPorts.push(port);
|
|
@@ -65386,7 +65386,7 @@ class GraphFrame {
|
|
|
65386
65386
|
export() {
|
|
65387
65387
|
const state = this._ownerCanvas.stateManager;
|
|
65388
65388
|
const json = state.exportData(state.data);
|
|
65389
|
-
|
|
65389
|
+
_stringTools__WEBPACK_IMPORTED_MODULE_2__.StringTools.DownloadAsFile(state.hostDocument, json, this._name + ".json");
|
|
65390
65390
|
}
|
|
65391
65391
|
adjustPorts() {
|
|
65392
65392
|
for (const node of this.nodes) {
|
|
@@ -69866,12 +69866,16 @@ class BlockNodeData {
|
|
|
69866
69866
|
this.data = data;
|
|
69867
69867
|
this._inputs = [];
|
|
69868
69868
|
this._outputs = [];
|
|
69869
|
-
|
|
69870
|
-
this.
|
|
69871
|
-
|
|
69872
|
-
|
|
69873
|
-
|
|
69874
|
-
|
|
69869
|
+
if (data.inputs) {
|
|
69870
|
+
this.data.inputs.forEach((input) => {
|
|
69871
|
+
this._inputs.push(new _connectionPointPortData__WEBPACK_IMPORTED_MODULE_0__.ConnectionPointPortData(input, nodeContainer));
|
|
69872
|
+
});
|
|
69873
|
+
}
|
|
69874
|
+
if (data.outputs) {
|
|
69875
|
+
this.data.outputs.forEach((output) => {
|
|
69876
|
+
this._outputs.push(new _connectionPointPortData__WEBPACK_IMPORTED_MODULE_0__.ConnectionPointPortData(output, nodeContainer));
|
|
69877
|
+
});
|
|
69878
|
+
}
|
|
69875
69879
|
}
|
|
69876
69880
|
get uniqueId() {
|
|
69877
69881
|
return this.data.uniqueId;
|
|
@@ -69938,6 +69942,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
69938
69942
|
/* harmony import */ var core_Materials_Node_nodeMaterialBlockConnectionPoint__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/Materials/Node/nodeMaterialBlockConnectionPoint */ "core/Misc/dataStorage");
|
|
69939
69943
|
/* 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
69944
|
/* 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");
|
|
69945
|
+
/* 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");
|
|
69946
|
+
|
|
69941
69947
|
|
|
69942
69948
|
|
|
69943
69949
|
class ConnectionPointPortData {
|
|
@@ -69978,10 +69984,11 @@ class ConnectionPointPortData {
|
|
|
69978
69984
|
}
|
|
69979
69985
|
if (!this._connectedPort) {
|
|
69980
69986
|
const otherBlock = this.data.connectedPoint.ownerBlock;
|
|
69981
|
-
|
|
69982
|
-
if (otherNode) {
|
|
69983
|
-
|
|
69987
|
+
let otherNode = this._nodeContainer.nodes.find((n) => n.content.data === otherBlock);
|
|
69988
|
+
if (!otherNode) {
|
|
69989
|
+
otherNode = this._nodeContainer.appendNode(shared_ui_components_nodeGraphSystem_typeLedger__WEBPACK_IMPORTED_MODULE_2__.TypeLedger.NodeDataBuilder(otherBlock, this._nodeContainer));
|
|
69984
69990
|
}
|
|
69991
|
+
this._connectedPort = otherNode.getPortDataForPortDataContent(this.data.connectedPoint);
|
|
69985
69992
|
}
|
|
69986
69993
|
return this._connectedPort;
|
|
69987
69994
|
}
|