@babylonjs/node-geometry-editor 6.19.0 → 6.20.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.
|
@@ -54632,24 +54632,25 @@ class NodeLink {
|
|
|
54632
54632
|
}
|
|
54633
54633
|
onClick(evt) {
|
|
54634
54634
|
const stateManager = this._graphCanvas.stateManager;
|
|
54635
|
+
const nodeA = this._nodeA;
|
|
54636
|
+
const pointA = this._portA.portData;
|
|
54637
|
+
const nodeB = this._nodeB;
|
|
54638
|
+
const pointB = this._portB.portData;
|
|
54639
|
+
const reconnect = (newNode) => {
|
|
54640
|
+
const newBlock = newNode.content.data;
|
|
54641
|
+
// Delete previous link
|
|
54642
|
+
this.dispose();
|
|
54643
|
+
// Connect to the new block
|
|
54644
|
+
this._graphCanvas.connectNodes(nodeA, pointA, newNode, newNode.getPortDataForPortDataContent(newBlock.input));
|
|
54645
|
+
this._graphCanvas.connectNodes(newNode, newNode.getPortDataForPortDataContent(newBlock.output), nodeB, pointB);
|
|
54646
|
+
stateManager.onRebuildRequiredObservable.notifyObservers();
|
|
54647
|
+
};
|
|
54635
54648
|
if (evt.altKey) {
|
|
54636
|
-
const nodeA = this._nodeA;
|
|
54637
|
-
const pointA = this._portA.portData;
|
|
54638
|
-
const nodeB = this._nodeB;
|
|
54639
|
-
const pointB = this._portB.portData;
|
|
54640
54649
|
if (!stateManager.isElbowConnectionAllowed(this._portA, this._portB)) {
|
|
54641
54650
|
return;
|
|
54642
54651
|
}
|
|
54643
54652
|
// Create an elbow at the clicked location
|
|
54644
|
-
stateManager.onNewNodeCreatedObservable.addOnce(
|
|
54645
|
-
const newElbowBlock = newNode.content.data;
|
|
54646
|
-
// Delete previous link
|
|
54647
|
-
this.dispose();
|
|
54648
|
-
// Connect to Elbow block
|
|
54649
|
-
this._graphCanvas.connectNodes(nodeA, pointA, newNode, newNode.getPortDataForPortDataContent(newElbowBlock.input));
|
|
54650
|
-
this._graphCanvas.connectNodes(newNode, newNode.getPortDataForPortDataContent(newElbowBlock.output), nodeB, pointB);
|
|
54651
|
-
stateManager.onRebuildRequiredObservable.notifyObservers();
|
|
54652
|
-
});
|
|
54653
|
+
stateManager.onNewNodeCreatedObservable.addOnce(reconnect);
|
|
54653
54654
|
stateManager.onNewBlockRequiredObservable.notifyObservers({
|
|
54654
54655
|
type: "ElbowBlock",
|
|
54655
54656
|
targetX: evt.clientX,
|
|
@@ -54658,6 +54659,20 @@ class NodeLink {
|
|
|
54658
54659
|
});
|
|
54659
54660
|
return;
|
|
54660
54661
|
}
|
|
54662
|
+
if (evt.ctrlKey) {
|
|
54663
|
+
if (!stateManager.isDebugConnectionAllowed(this._portA, this._portB)) {
|
|
54664
|
+
return;
|
|
54665
|
+
}
|
|
54666
|
+
// Create a debug at the clicked location
|
|
54667
|
+
stateManager.onNewNodeCreatedObservable.addOnce(reconnect);
|
|
54668
|
+
stateManager.onNewBlockRequiredObservable.notifyObservers({
|
|
54669
|
+
type: "DebugBlock",
|
|
54670
|
+
targetX: evt.clientX,
|
|
54671
|
+
targetY: evt.clientY,
|
|
54672
|
+
needRepositioning: true,
|
|
54673
|
+
});
|
|
54674
|
+
return;
|
|
54675
|
+
}
|
|
54661
54676
|
stateManager.onSelectionChangedObservable.notifyObservers({ selection: this });
|
|
54662
54677
|
}
|
|
54663
54678
|
dispose(notify = true) {
|
|
@@ -55221,7 +55236,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
55221
55236
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
55222
55237
|
/* harmony export */ BlockTools: () => (/* binding */ BlockTools)
|
|
55223
55238
|
/* harmony export */ });
|
|
55224
|
-
/* harmony import */ var core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/Meshes/Node/Blocks/
|
|
55239
|
+
/* harmony import */ var core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/Meshes/Node/Blocks/matrixComposeBlock */ "core/Misc/observable");
|
|
55225
55240
|
/* harmony import */ var core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_0__);
|
|
55226
55241
|
|
|
55227
55242
|
|
|
@@ -55272,11 +55287,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
55272
55287
|
|
|
55273
55288
|
|
|
55274
55289
|
|
|
55290
|
+
|
|
55275
55291
|
|
|
55276
55292
|
|
|
55277
55293
|
class BlockTools {
|
|
55278
55294
|
static GetBlockFromString(data) {
|
|
55279
55295
|
switch (data) {
|
|
55296
|
+
case "MatrixComposeBlock":
|
|
55297
|
+
return new core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_0__.MatrixComposeBlock("Matrix Compose");
|
|
55280
55298
|
case "GeometryInfoBlock":
|
|
55281
55299
|
return new core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_0__.GeometryInfoBlock("Geometry Info");
|
|
55282
55300
|
case "CollectionBlock":
|
|
@@ -55472,6 +55490,11 @@ class BlockTools {
|
|
|
55472
55490
|
block.contextualValue = core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_0__.NodeGeometryContextualSources.LoopID;
|
|
55473
55491
|
return block;
|
|
55474
55492
|
}
|
|
55493
|
+
case "InstanceIDBlock": {
|
|
55494
|
+
const block = new core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_0__.GeometryInputBlock("Instance ID");
|
|
55495
|
+
block.contextualValue = core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_0__.NodeGeometryContextualSources.InstanceID;
|
|
55496
|
+
return block;
|
|
55497
|
+
}
|
|
55475
55498
|
case "GeometryIDBlock": {
|
|
55476
55499
|
const block = new core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_0__.GeometryInputBlock("Geometry ID");
|
|
55477
55500
|
block.contextualValue = core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_0__.NodeGeometryContextualSources.GeometryID;
|
|
@@ -55852,6 +55875,7 @@ class NodeListComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
|
|
|
55852
55875
|
"VertexIDBlock",
|
|
55853
55876
|
"FaceIDBlock",
|
|
55854
55877
|
"LoopIDBlock",
|
|
55878
|
+
"InstanceIDBlock",
|
|
55855
55879
|
"GeometryIDBlock",
|
|
55856
55880
|
"CollectionIDBlock",
|
|
55857
55881
|
],
|
|
@@ -55888,7 +55912,7 @@ class NodeListComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
|
|
|
55888
55912
|
"ToRadiansBlock",
|
|
55889
55913
|
],
|
|
55890
55914
|
Math__Vector: ["TransformBlock", "VectorConverterBlock", "NormalizeBlock"],
|
|
55891
|
-
Matrices: ["RotationXBlock", "RotationYBlock", "RotationZBlock", "ScalingBlock", "TranslationBlock", "AlignBlock"],
|
|
55915
|
+
Matrices: ["RotationXBlock", "RotationYBlock", "RotationZBlock", "ScalingBlock", "TranslationBlock", "AlignBlock", "MatrixComposeBlock"],
|
|
55892
55916
|
Instances: ["InstantiateOnVerticesBlock", "InstantiateOnFacesBlock", "InstantiateOnVolumeBlock", "InstantiateBlock"],
|
|
55893
55917
|
Misc: ["ElbowBlock", "DebugBlock", "TeleportInBlock", "TeleportOutBlock", "GeometryInfoBlock"],
|
|
55894
55918
|
Updates: [
|
|
@@ -55988,6 +56012,7 @@ NodeListComponent._Tooltips = {
|
|
|
55988
56012
|
VertexIDBlock: "Contextual value representing the vertex index of the current vertex of the active geometry",
|
|
55989
56013
|
FaceIDBlock: "Contextual value representing the face index of the current face of the active geometry",
|
|
55990
56014
|
LoopIDBlock: "Contextual value representing the current loop index (within a clone or an instantiate block)",
|
|
56015
|
+
InstanceIDBlock: "Contextual value representing the current instance index (within an instantiate block)",
|
|
55991
56016
|
GeometryIDBlock: "Contextual value representing the identifier of the current active geometry",
|
|
55992
56017
|
CollectionIDBlock: "Contextual value representing the collection ID associated with the current active geometry",
|
|
55993
56018
|
EqualBlock: "Conditional block set to Equal",
|
|
@@ -56016,14 +56041,14 @@ NodeListComponent._Tooltips = {
|
|
|
56016
56041
|
CeilingBlock: "Trigonometry block set to Ceiling",
|
|
56017
56042
|
IntFloatConverterBlock: "Block used to convert from Int to Float or Float to Int",
|
|
56018
56043
|
AbsBlock: "Trigonometry block set to Abs",
|
|
56019
|
-
ArcCosBlock: "Trigonometry block set to Arc cos",
|
|
56020
|
-
ArcSinBlock: "Trigonometry block set to Arc sin",
|
|
56021
|
-
ArcTanBlock: "Trigonometry block set to Arc tan",
|
|
56022
|
-
CosBlock: "Trigonometry block set to Cos",
|
|
56023
|
-
ExpBlock: "Trigonometry block set to Exp",
|
|
56024
|
-
LogBlock: "Trigonometry block set to Log",
|
|
56025
|
-
SinBlock: "Trigonometry block set to Sin",
|
|
56026
|
-
TanBlock: "Trigonometry block set to Tan",
|
|
56044
|
+
ArcCosBlock: "Trigonometry block set to Arc cos (using radians)",
|
|
56045
|
+
ArcSinBlock: "Trigonometry block set to Arc sin (using radians)",
|
|
56046
|
+
ArcTanBlock: "Trigonometry block set to Arc tan (using radians)",
|
|
56047
|
+
CosBlock: "Trigonometry block set to Cos (using radians)",
|
|
56048
|
+
ExpBlock: "Trigonometry block set to Exp (using radians)",
|
|
56049
|
+
LogBlock: "Trigonometry block set to Log (using radians)",
|
|
56050
|
+
SinBlock: "Trigonometry block set to Sin (using radians)",
|
|
56051
|
+
TanBlock: "Trigonometry block set to Tan (using radians)",
|
|
56027
56052
|
ToDegreesBlock: "Conversion block used to convert radians to degree",
|
|
56028
56053
|
ToRadiansBlock: "Conversion block used to convert degrees to radians",
|
|
56029
56054
|
TransformBlock: "Apply a transform to a geometry or a vector",
|
|
@@ -56058,6 +56083,7 @@ NodeListComponent._Tooltips = {
|
|
|
56058
56083
|
OptimizeBlock: "Eliminate vertices that share positions with another vertex",
|
|
56059
56084
|
GeometryInfoBlock: "Provides information about a geometry",
|
|
56060
56085
|
MappingBlock: "Generate uv coordinates based on mapping type",
|
|
56086
|
+
MatrixComposeBlock: "Multiply two matrices together",
|
|
56061
56087
|
};
|
|
56062
56088
|
|
|
56063
56089
|
|
|
@@ -56975,6 +57001,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
56975
57001
|
/* harmony import */ var _graphSystem_registerDefaultInput__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./graphSystem/registerDefaultInput */ "../../../tools/nodeGeometryEditor/dist/graphSystem/registerDefaultInput.js");
|
|
56976
57002
|
/* harmony import */ var _graphSystem_registerExportData__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./graphSystem/registerExportData */ "../../../tools/nodeGeometryEditor/dist/graphSystem/registerExportData.js");
|
|
56977
57003
|
/* harmony import */ var _components_preview_previewMode__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./components/preview/previewMode */ "../../../tools/nodeGeometryEditor/dist/components/preview/previewMode.js");
|
|
57004
|
+
/* harmony import */ var _graphSystem_registerDebugSupport__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./graphSystem/registerDebugSupport */ "../../../tools/nodeGeometryEditor/dist/graphSystem/registerDebugSupport.js");
|
|
57005
|
+
|
|
56978
57006
|
|
|
56979
57007
|
|
|
56980
57008
|
|
|
@@ -57018,6 +57046,7 @@ class GlobalState {
|
|
|
57018
57046
|
this.stateManager.data = this;
|
|
57019
57047
|
this.stateManager.lockObject = this.lockObject;
|
|
57020
57048
|
(0,_graphSystem_registerElbowSupport__WEBPACK_IMPORTED_MODULE_1__.RegisterElbowSupport)(this.stateManager);
|
|
57049
|
+
(0,_graphSystem_registerDebugSupport__WEBPACK_IMPORTED_MODULE_8__.RegisterDebugSupport)(this.stateManager);
|
|
57021
57050
|
(0,_graphSystem_registerNodePortDesign__WEBPACK_IMPORTED_MODULE_2__.RegisterNodePortDesign)(this.stateManager);
|
|
57022
57051
|
(0,_graphSystem_registerDefaultInput__WEBPACK_IMPORTED_MODULE_5__.RegisterDefaultInput)(this.stateManager);
|
|
57023
57052
|
(0,_graphSystem_registerExportData__WEBPACK_IMPORTED_MODULE_6__.RegisterExportData)(this.stateManager);
|
|
@@ -57523,7 +57552,7 @@ class GraphEditor extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
|
|
|
57523
57552
|
// Size exceptions
|
|
57524
57553
|
let offsetX = shared_ui_components_nodeGraphSystem_graphCanvas__WEBPACK_IMPORTED_MODULE_16__.GraphCanvasComponent.NodeWidth;
|
|
57525
57554
|
let offsetY = 20;
|
|
57526
|
-
if (blockType === "ElbowBlock") {
|
|
57555
|
+
if (blockType === "ElbowBlock" || blockType === "DebugBlock") {
|
|
57527
57556
|
offsetX = 10;
|
|
57528
57557
|
offsetY = 10;
|
|
57529
57558
|
}
|
|
@@ -57963,6 +57992,9 @@ class InputDisplayManager {
|
|
|
57963
57992
|
case core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_2__.NodeGeometryContextualSources.LoopID:
|
|
57964
57993
|
value = "LoopID";
|
|
57965
57994
|
break;
|
|
57995
|
+
case core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_2__.NodeGeometryContextualSources.InstanceID:
|
|
57996
|
+
value = "InstanceID";
|
|
57997
|
+
break;
|
|
57966
57998
|
case core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_2__.NodeGeometryContextualSources.CollectionID:
|
|
57967
57999
|
value = "CollectionID";
|
|
57968
58000
|
break;
|
|
@@ -58678,6 +58710,7 @@ class InputPropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Compo
|
|
|
58678
58710
|
{ label: "Vertex ID", value: core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_12__.NodeGeometryContextualSources.VertexID },
|
|
58679
58711
|
{ label: "Face ID", value: core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_12__.NodeGeometryContextualSources.FaceID },
|
|
58680
58712
|
{ label: "Loop ID", value: core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_12__.NodeGeometryContextualSources.LoopID },
|
|
58713
|
+
{ label: "Instance ID", value: core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_12__.NodeGeometryContextualSources.InstanceID },
|
|
58681
58714
|
{ label: "Geometry ID", value: core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_12__.NodeGeometryContextualSources.GeometryID },
|
|
58682
58715
|
{ label: "Collection ID", value: core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_12__.NodeGeometryContextualSources.CollectionID },
|
|
58683
58716
|
];
|
|
@@ -59000,6 +59033,34 @@ class TeleportOutPropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__
|
|
|
59000
59033
|
}
|
|
59001
59034
|
|
|
59002
59035
|
|
|
59036
|
+
/***/ }),
|
|
59037
|
+
|
|
59038
|
+
/***/ "../../../tools/nodeGeometryEditor/dist/graphSystem/registerDebugSupport.js":
|
|
59039
|
+
/*!**********************************************************************************!*\
|
|
59040
|
+
!*** ../../../tools/nodeGeometryEditor/dist/graphSystem/registerDebugSupport.js ***!
|
|
59041
|
+
\**********************************************************************************/
|
|
59042
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
59043
|
+
|
|
59044
|
+
"use strict";
|
|
59045
|
+
__webpack_require__.r(__webpack_exports__);
|
|
59046
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
59047
|
+
/* harmony export */ RegisterDebugSupport: () => (/* binding */ RegisterDebugSupport)
|
|
59048
|
+
/* harmony export */ });
|
|
59049
|
+
/* harmony import */ var core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/Meshes/Node/Enums/nodeGeometryConnectionPointTypes */ "core/Misc/observable");
|
|
59050
|
+
/* harmony import */ var core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_0__);
|
|
59051
|
+
|
|
59052
|
+
const RegisterDebugSupport = (stateManager) => {
|
|
59053
|
+
stateManager.isDebugConnectionAllowed = (a, b) => {
|
|
59054
|
+
const pointA = a.portData.data;
|
|
59055
|
+
const pointB = b.portData.data;
|
|
59056
|
+
if (pointA.type === core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_0__.NodeGeometryBlockConnectionPointTypes.Geometry || pointB.type === core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_0__.NodeGeometryBlockConnectionPointTypes.Geometry) {
|
|
59057
|
+
return false; // We do not support debug on geometries
|
|
59058
|
+
}
|
|
59059
|
+
return true;
|
|
59060
|
+
};
|
|
59061
|
+
};
|
|
59062
|
+
|
|
59063
|
+
|
|
59003
59064
|
/***/ }),
|
|
59004
59065
|
|
|
59005
59066
|
/***/ "../../../tools/nodeGeometryEditor/dist/graphSystem/registerDefaultInput.js":
|