@babylonjs/node-geometry-editor 6.16.2 → 6.17.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.
|
@@ -51038,12 +51038,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
51038
51038
|
/* harmony export */ });
|
|
51039
51039
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "../../../../node_modules/react/jsx-runtime.js");
|
|
51040
51040
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "../../../../node_modules/react/index.js");
|
|
51041
|
-
/* harmony import */ var
|
|
51042
|
-
/* harmony import */ var
|
|
51041
|
+
/* harmony import */ var core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core/Misc/tools */ "core/Misc/observable");
|
|
51042
|
+
/* harmony import */ var core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_2__);
|
|
51043
|
+
/* harmony import */ var _lines_numericInputComponent__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../lines/numericInputComponent */ "../../../dev/sharedUiComponents/dist/lines/numericInputComponent.js");
|
|
51044
|
+
/* harmony import */ var _fortawesome_react_fontawesome__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @fortawesome/react-fontawesome */ "../../../../node_modules/@fortawesome/react-fontawesome/index.es.js");
|
|
51043
51045
|
/* harmony import */ var _fortawesome_free_solid_svg_icons__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @fortawesome/free-solid-svg-icons */ "../../../../node_modules/@fortawesome/free-solid-svg-icons/index.mjs");
|
|
51044
|
-
/* harmony import */ var
|
|
51045
|
-
|
|
51046
|
-
/* harmony import */ var core_Misc_tools__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_Misc_tools__WEBPACK_IMPORTED_MODULE_5__);
|
|
51046
|
+
/* harmony import */ var _lines_sliderLineComponent__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../lines/sliderLineComponent */ "../../../dev/sharedUiComponents/dist/lines/sliderLineComponent.js");
|
|
51047
|
+
|
|
51047
51048
|
|
|
51048
51049
|
|
|
51049
51050
|
|
|
@@ -51055,7 +51056,8 @@ class Vector3LineComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component
|
|
|
51055
51056
|
constructor(props) {
|
|
51056
51057
|
super(props);
|
|
51057
51058
|
this._localChange = false;
|
|
51058
|
-
|
|
51059
|
+
const value = this.getCurrentValue();
|
|
51060
|
+
this.state = { isExpanded: false, value: value ? value.clone() : core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_2__.Vector3.Zero() };
|
|
51059
51061
|
}
|
|
51060
51062
|
getCurrentValue() {
|
|
51061
51063
|
return this.props.target[this.props.propertyName];
|
|
@@ -51109,9 +51111,9 @@ class Vector3LineComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component
|
|
|
51109
51111
|
this.updateVector3();
|
|
51110
51112
|
}
|
|
51111
51113
|
render() {
|
|
51112
|
-
const chevron = this.state.isExpanded ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
51114
|
+
const chevron = this.state.isExpanded ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_fortawesome_react_fontawesome__WEBPACK_IMPORTED_MODULE_4__.FontAwesomeIcon, { icon: _fortawesome_free_solid_svg_icons__WEBPACK_IMPORTED_MODULE_6__.faMinus }) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_fortawesome_react_fontawesome__WEBPACK_IMPORTED_MODULE_4__.FontAwesomeIcon, { icon: _fortawesome_free_solid_svg_icons__WEBPACK_IMPORTED_MODULE_6__.faPlus });
|
|
51113
51115
|
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "vector3Line", children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "firstLine", children: [this.props.icon && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("img", { src: this.props.icon, title: this.props.iconLabel, alt: this.props.iconLabel, className: "icon" }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "label", title: this.props.label, children: this.props.label }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "vector", children: [!this.props.useEuler && `X: ${this.state.value.x.toFixed(2)}, Y: ${this.state.value.y.toFixed(2)}, Z: ${this.state.value.z.toFixed(2)}`, this.props.useEuler &&
|
|
51114
|
-
`X: ${
|
|
51116
|
+
`X: ${core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_2__.Tools.ToDegrees(this.state.value.x).toFixed(2)}, Y: ${core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_2__.Tools.ToDegrees(this.state.value.y).toFixed(2)}, Z: ${core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_2__.Tools.ToDegrees(this.state.value.z).toFixed(2)}`] }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "expand hoverIcon", onClick: () => this.switchExpandState(), title: "Expand", children: chevron })] }), this.state.isExpanded && !this.props.useEuler && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "secondLine", children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_lines_numericInputComponent__WEBPACK_IMPORTED_MODULE_3__.NumericInputComponent, { label: "x", lockObject: this.props.lockObject, step: this.props.step, value: this.state.value.x, onChange: (value) => this.updateStateX(value) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_lines_numericInputComponent__WEBPACK_IMPORTED_MODULE_3__.NumericInputComponent, { label: "y", lockObject: this.props.lockObject, step: this.props.step, value: this.state.value.y, onChange: (value) => this.updateStateY(value) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_lines_numericInputComponent__WEBPACK_IMPORTED_MODULE_3__.NumericInputComponent, { label: "z", lockObject: this.props.lockObject, step: this.props.step, value: this.state.value.z, onChange: (value) => this.updateStateZ(value) })] })), this.state.isExpanded && this.props.useEuler && !this.props.noSlider && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "secondLine", children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_lines_sliderLineComponent__WEBPACK_IMPORTED_MODULE_5__.SliderLineComponent, { lockObject: this.props.lockObject, margin: true, label: "x", minimum: 0, maximum: 360, step: 0.1, directValue: core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_2__.Tools.ToDegrees(this.state.value.x), onChange: (value) => this.updateStateX(core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_2__.Tools.ToRadians(value)) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_lines_sliderLineComponent__WEBPACK_IMPORTED_MODULE_5__.SliderLineComponent, { lockObject: this.props.lockObject, margin: true, label: "y", minimum: 0, maximum: 360, step: 0.1, directValue: core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_2__.Tools.ToDegrees(this.state.value.y), onChange: (value) => this.updateStateY(core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_2__.Tools.ToRadians(value)) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_lines_sliderLineComponent__WEBPACK_IMPORTED_MODULE_5__.SliderLineComponent, { lockObject: this.props.lockObject, margin: true, label: "z", minimum: 0, maximum: 360, step: 0.1, directValue: core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_2__.Tools.ToDegrees(this.state.value.z), onChange: (value) => this.updateStateZ(core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_2__.Tools.ToRadians(value)) })] })), this.state.isExpanded && this.props.useEuler && this.props.noSlider && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "secondLine", children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_lines_numericInputComponent__WEBPACK_IMPORTED_MODULE_3__.NumericInputComponent, { lockObject: this.props.lockObject, label: "x", step: this.props.step, value: core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_2__.Tools.ToDegrees(this.state.value.x), onChange: (value) => this.updateStateX(core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_2__.Tools.ToRadians(value)) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_lines_numericInputComponent__WEBPACK_IMPORTED_MODULE_3__.NumericInputComponent, { lockObject: this.props.lockObject, label: "y", step: this.props.step, value: core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_2__.Tools.ToDegrees(this.state.value.y), onChange: (value) => this.updateStateY(core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_2__.Tools.ToRadians(value)) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_lines_numericInputComponent__WEBPACK_IMPORTED_MODULE_3__.NumericInputComponent, { lockObject: this.props.lockObject, label: "z", step: this.props.step, value: core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_2__.Tools.ToDegrees(this.state.value.z), onChange: (value) => this.updateStateZ(core_Maths_math_vector__WEBPACK_IMPORTED_MODULE_2__.Tools.ToRadians(value)) })] }))] }));
|
|
51115
51117
|
}
|
|
51116
51118
|
}
|
|
51117
51119
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
@@ -54269,6 +54271,8 @@ class GraphNode {
|
|
|
54269
54271
|
const availableNodeOutputs = [];
|
|
54270
54272
|
const leftNode = this._ownerCanvas._targetLinkCandidate.nodeA;
|
|
54271
54273
|
const rightNode = this._ownerCanvas._targetLinkCandidate.nodeB;
|
|
54274
|
+
const leftPort = this._ownerCanvas._targetLinkCandidate.portA.portData;
|
|
54275
|
+
const rightPort = this._ownerCanvas._targetLinkCandidate.portB.portData;
|
|
54272
54276
|
// Delete previous
|
|
54273
54277
|
this._ownerCanvas._targetLinkCandidate.dispose();
|
|
54274
54278
|
this._ownerCanvas._targetLinkCandidate = null;
|
|
@@ -54277,6 +54281,17 @@ class GraphNode {
|
|
|
54277
54281
|
availableNodeOutputs.push(...this.content.outputs);
|
|
54278
54282
|
inputs.push(...leftNode.content.outputs);
|
|
54279
54283
|
outputs.push(...rightNode.content.inputs.filter((i) => !i.isConnected));
|
|
54284
|
+
// Prioritize the already connected ports
|
|
54285
|
+
const leftPortIndex = inputs.indexOf(leftPort);
|
|
54286
|
+
const rightPortIndex = outputs.indexOf(rightPort);
|
|
54287
|
+
if (leftPortIndex > 0) {
|
|
54288
|
+
inputs.splice(leftPortIndex, 1);
|
|
54289
|
+
inputs.splice(0, 0, leftPort);
|
|
54290
|
+
}
|
|
54291
|
+
if (rightPortIndex > 0) {
|
|
54292
|
+
outputs.splice(rightPortIndex, 1);
|
|
54293
|
+
outputs.splice(0, 0, rightPort);
|
|
54294
|
+
}
|
|
54280
54295
|
// Reconnect
|
|
54281
54296
|
this._ownerCanvas.automaticRewire(inputs, availableNodeInputs, true);
|
|
54282
54297
|
this._ownerCanvas.automaticRewire(availableNodeOutputs, outputs, true);
|
|
@@ -55254,6 +55269,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
55254
55269
|
|
|
55255
55270
|
|
|
55256
55271
|
|
|
55272
|
+
|
|
55257
55273
|
|
|
55258
55274
|
|
|
55259
55275
|
class BlockTools {
|
|
@@ -55318,6 +55334,8 @@ class BlockTools {
|
|
|
55318
55334
|
}
|
|
55319
55335
|
case "SetMaterialIDBlock":
|
|
55320
55336
|
return new core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_0__.SetMaterialIDBlock("Set material ID");
|
|
55337
|
+
case "InstantiateOnVolumeBlock":
|
|
55338
|
+
return new core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_0__.InstantiateOnVolumeBlock("Instantiate on volume");
|
|
55321
55339
|
case "InstantiateOnFacesBlock":
|
|
55322
55340
|
return new core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_0__.InstantiateOnFacesBlock("Instantiate on faces");
|
|
55323
55341
|
case "InstantiateOnVerticesBlock":
|
|
@@ -55439,6 +55457,11 @@ class BlockTools {
|
|
|
55439
55457
|
block.contextualValue = core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_0__.NodeGeometryContextualSources.VertexID;
|
|
55440
55458
|
return block;
|
|
55441
55459
|
}
|
|
55460
|
+
case "GeometryIDBlock": {
|
|
55461
|
+
const block = new core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_0__.GeometryInputBlock("Geometry ID");
|
|
55462
|
+
block.contextualValue = core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_0__.NodeGeometryContextualSources.GeometryID;
|
|
55463
|
+
return block;
|
|
55464
|
+
}
|
|
55442
55465
|
case "FaceIDBlock": {
|
|
55443
55466
|
const block = new core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_0__.GeometryInputBlock("Face ID");
|
|
55444
55467
|
block.contextualValue = core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_0__.NodeGeometryContextualSources.FaceID;
|
|
@@ -55804,6 +55827,7 @@ class NodeListComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
|
|
|
55804
55827
|
"UV6sBlock",
|
|
55805
55828
|
"VertexIDBlock",
|
|
55806
55829
|
"FaceIDBlock",
|
|
55830
|
+
"GeometryIDBlock",
|
|
55807
55831
|
],
|
|
55808
55832
|
Logical: ["EqualBlock", "NotEqualBlock", "LessThanBlock", "LessOrEqualBlock", "GreaterThanBlock", "GreaterOrEqualBlock", "XorBlock", "OrBlock", "AndBlock"],
|
|
55809
55833
|
Math__Standard: [
|
|
@@ -55839,7 +55863,7 @@ class NodeListComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
|
|
|
55839
55863
|
],
|
|
55840
55864
|
Math__Vector: ["TransformBlock", "VectorConverterBlock", "NormalizeBlock"],
|
|
55841
55865
|
Matrices: ["RotationXBlock", "RotationYBlock", "RotationZBlock", "ScalingBlock", "TranslationBlock", "AlignBlock"],
|
|
55842
|
-
Instances: ["InstantiateOnVerticesBlock", "InstantiateOnFacesBlock"],
|
|
55866
|
+
Instances: ["InstantiateOnVerticesBlock", "InstantiateOnFacesBlock", "InstantiateOnVolumeBlock"],
|
|
55843
55867
|
Misc: ["ElbowBlock", "DebugBlock", "TeleportInBlock", "TeleportOutBlock"],
|
|
55844
55868
|
Updates: [
|
|
55845
55869
|
"SetColorsBlock",
|
|
@@ -55921,6 +55945,7 @@ NodeListComponent._Tooltips = {
|
|
|
55921
55945
|
UV6sBlock: "Contextual value pointing at the uvs6 array of the active geometry",
|
|
55922
55946
|
VertexIDBlock: "Contextual value representing the vertex index of the current vertex of the active geometry",
|
|
55923
55947
|
FaceIDBlock: "Contextual value representing the face index of the current face of the active geometry",
|
|
55948
|
+
GeometryIDBlock: "Contextual value representing the identifier of the current active geometry",
|
|
55924
55949
|
EqualBlock: "Conditional block set to Equal",
|
|
55925
55950
|
NotEqualBlock: "Conditional block set to NotEqual",
|
|
55926
55951
|
LessThanBlock: "Conditional block set to LessThan",
|
|
@@ -55968,6 +55993,7 @@ NodeListComponent._Tooltips = {
|
|
|
55968
55993
|
AlignBlock: "Create a rotation matrix used to align two vectors",
|
|
55969
55994
|
InstantiateOnVerticesBlock: "Instantiate a geometry on every vertex of a target geometry",
|
|
55970
55995
|
InstantiateOnFacesBlock: "Instantiate a geometry on the faces of a target geometry",
|
|
55996
|
+
InstantiateOnVolumeBlock: "Instantiate a geometry inside a target geometry",
|
|
55971
55997
|
ElbowBlock: "Passthrough block mostly used to organize your graph",
|
|
55972
55998
|
TeleportInBlock: "Passthrough block mostly used to organize your graph (but without visible lines). It works like a teleportation point for the graph.",
|
|
55973
55999
|
TeleportOutBlock: "Endpoint for a TeleportInBlock.",
|
|
@@ -57862,6 +57888,9 @@ class InputDisplayManager {
|
|
|
57862
57888
|
case core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_2__.NodeGeometryContextualSources.VertexID:
|
|
57863
57889
|
value = "VertexID";
|
|
57864
57890
|
break;
|
|
57891
|
+
case core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_2__.NodeGeometryContextualSources.GeometryID:
|
|
57892
|
+
value = "GeometryID";
|
|
57893
|
+
break;
|
|
57865
57894
|
case core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_2__.NodeGeometryContextualSources.FaceID:
|
|
57866
57895
|
value = "FaceID";
|
|
57867
57896
|
break;
|
|
@@ -58538,6 +58567,7 @@ class InputPropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Compo
|
|
|
58538
58567
|
contextualSourcesOptions = [
|
|
58539
58568
|
{ label: "Vertex ID", value: core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_13__.NodeGeometryContextualSources.VertexID },
|
|
58540
58569
|
{ label: "Face ID", value: core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_13__.NodeGeometryContextualSources.FaceID },
|
|
58570
|
+
{ label: "Geometry ID", value: core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_13__.NodeGeometryContextualSources.GeometryID },
|
|
58541
58571
|
];
|
|
58542
58572
|
break;
|
|
58543
58573
|
case core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_13__.NodeGeometryBlockConnectionPointTypes.Vector2:
|