@babylonjs/node-geometry-editor 6.16.2 → 6.17.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.
- package/dist/babylon.nodeGeometryEditor.js +1 -1
- package/dist/babylon.nodeGeometryEditor.js.map +1 -1
- package/dist/babylon.nodeGeometryEditor.max.js +160 -94
- package/dist/babylon.nodeGeometryEditor.max.js.map +1 -1
- package/dist/babylon.nodeGeometryEditor.module.d.ts +13 -2
- package/package.json +2 -2
|
@@ -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);
|
|
@@ -55208,7 +55223,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
55208
55223
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
55209
55224
|
/* harmony export */ BlockTools: () => (/* binding */ BlockTools)
|
|
55210
55225
|
/* harmony export */ });
|
|
55211
|
-
/* harmony import */ var core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/Meshes/Node/Blocks/
|
|
55226
|
+
/* harmony import */ var core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/Meshes/Node/Blocks/geometryInfoBlock */ "core/Misc/observable");
|
|
55212
55227
|
/* 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__);
|
|
55213
55228
|
|
|
55214
55229
|
|
|
@@ -55252,6 +55267,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
55252
55267
|
|
|
55253
55268
|
|
|
55254
55269
|
|
|
55270
|
+
|
|
55271
|
+
|
|
55272
|
+
|
|
55255
55273
|
|
|
55256
55274
|
|
|
55257
55275
|
|
|
@@ -55259,6 +55277,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
55259
55277
|
class BlockTools {
|
|
55260
55278
|
static GetBlockFromString(data) {
|
|
55261
55279
|
switch (data) {
|
|
55280
|
+
case "GeometryInfoBlock":
|
|
55281
|
+
return new core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_0__.GeometryInfoBlock("Geometry Info");
|
|
55282
|
+
case "CollectionBlock":
|
|
55283
|
+
return new core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_0__.GeometryCollectionBlock("Collection");
|
|
55262
55284
|
case "OptimizeBlock":
|
|
55263
55285
|
return new core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_0__.GeometryOptimizeBlock("Optimize");
|
|
55264
55286
|
case "NullBlock":
|
|
@@ -55318,6 +55340,8 @@ class BlockTools {
|
|
|
55318
55340
|
}
|
|
55319
55341
|
case "SetMaterialIDBlock":
|
|
55320
55342
|
return new core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_0__.SetMaterialIDBlock("Set material ID");
|
|
55343
|
+
case "InstantiateOnVolumeBlock":
|
|
55344
|
+
return new core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_0__.InstantiateOnVolumeBlock("Instantiate on volume");
|
|
55321
55345
|
case "InstantiateOnFacesBlock":
|
|
55322
55346
|
return new core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_0__.InstantiateOnFacesBlock("Instantiate on faces");
|
|
55323
55347
|
case "InstantiateOnVerticesBlock":
|
|
@@ -55439,6 +55463,16 @@ class BlockTools {
|
|
|
55439
55463
|
block.contextualValue = core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_0__.NodeGeometryContextualSources.VertexID;
|
|
55440
55464
|
return block;
|
|
55441
55465
|
}
|
|
55466
|
+
case "GeometryIDBlock": {
|
|
55467
|
+
const block = new core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_0__.GeometryInputBlock("Geometry ID");
|
|
55468
|
+
block.contextualValue = core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_0__.NodeGeometryContextualSources.GeometryID;
|
|
55469
|
+
return block;
|
|
55470
|
+
}
|
|
55471
|
+
case "CollectionIDBlock": {
|
|
55472
|
+
const block = new core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_0__.GeometryInputBlock("Collection ID");
|
|
55473
|
+
block.contextualValue = core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_0__.NodeGeometryContextualSources.CollectionID;
|
|
55474
|
+
return block;
|
|
55475
|
+
}
|
|
55442
55476
|
case "FaceIDBlock": {
|
|
55443
55477
|
const block = new core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_0__.GeometryInputBlock("Face ID");
|
|
55444
55478
|
block.contextualValue = core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_0__.NodeGeometryContextualSources.FaceID;
|
|
@@ -55804,6 +55838,8 @@ class NodeListComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
|
|
|
55804
55838
|
"UV6sBlock",
|
|
55805
55839
|
"VertexIDBlock",
|
|
55806
55840
|
"FaceIDBlock",
|
|
55841
|
+
"GeometryIDBlock",
|
|
55842
|
+
"CollectionIDBlock",
|
|
55807
55843
|
],
|
|
55808
55844
|
Logical: ["EqualBlock", "NotEqualBlock", "LessThanBlock", "LessOrEqualBlock", "GreaterThanBlock", "GreaterOrEqualBlock", "XorBlock", "OrBlock", "AndBlock"],
|
|
55809
55845
|
Math__Standard: [
|
|
@@ -55839,8 +55875,8 @@ class NodeListComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
|
|
|
55839
55875
|
],
|
|
55840
55876
|
Math__Vector: ["TransformBlock", "VectorConverterBlock", "NormalizeBlock"],
|
|
55841
55877
|
Matrices: ["RotationXBlock", "RotationYBlock", "RotationZBlock", "ScalingBlock", "TranslationBlock", "AlignBlock"],
|
|
55842
|
-
Instances: ["InstantiateOnVerticesBlock", "InstantiateOnFacesBlock"],
|
|
55843
|
-
Misc: ["ElbowBlock", "DebugBlock", "TeleportInBlock", "TeleportOutBlock"],
|
|
55878
|
+
Instances: ["InstantiateOnVerticesBlock", "InstantiateOnFacesBlock", "InstantiateOnVolumeBlock"],
|
|
55879
|
+
Misc: ["ElbowBlock", "DebugBlock", "TeleportInBlock", "TeleportOutBlock", "GeometryInfoBlock"],
|
|
55844
55880
|
Updates: [
|
|
55845
55881
|
"SetColorsBlock",
|
|
55846
55882
|
"SetNormalsBlock",
|
|
@@ -55849,6 +55885,7 @@ class NodeListComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
|
|
|
55849
55885
|
"SetUVsBlock",
|
|
55850
55886
|
"SetMaterialIDBlock",
|
|
55851
55887
|
"MergeBlock",
|
|
55888
|
+
"CollectionBlock",
|
|
55852
55889
|
"ComputeNormalsBlock",
|
|
55853
55890
|
"OptimizeBlock",
|
|
55854
55891
|
],
|
|
@@ -55921,6 +55958,8 @@ NodeListComponent._Tooltips = {
|
|
|
55921
55958
|
UV6sBlock: "Contextual value pointing at the uvs6 array of the active geometry",
|
|
55922
55959
|
VertexIDBlock: "Contextual value representing the vertex index of the current vertex of the active geometry",
|
|
55923
55960
|
FaceIDBlock: "Contextual value representing the face index of the current face of the active geometry",
|
|
55961
|
+
GeometryIDBlock: "Contextual value representing the identifier of the current active geometry",
|
|
55962
|
+
CollectionIDBlock: "Contextual value representing the collection ID associated with the current active geometry",
|
|
55924
55963
|
EqualBlock: "Conditional block set to Equal",
|
|
55925
55964
|
NotEqualBlock: "Conditional block set to NotEqual",
|
|
55926
55965
|
LessThanBlock: "Conditional block set to LessThan",
|
|
@@ -55968,6 +56007,7 @@ NodeListComponent._Tooltips = {
|
|
|
55968
56007
|
AlignBlock: "Create a rotation matrix used to align two vectors",
|
|
55969
56008
|
InstantiateOnVerticesBlock: "Instantiate a geometry on every vertex of a target geometry",
|
|
55970
56009
|
InstantiateOnFacesBlock: "Instantiate a geometry on the faces of a target geometry",
|
|
56010
|
+
InstantiateOnVolumeBlock: "Instantiate a geometry inside a target geometry",
|
|
55971
56011
|
ElbowBlock: "Passthrough block mostly used to organize your graph",
|
|
55972
56012
|
TeleportInBlock: "Passthrough block mostly used to organize your graph (but without visible lines). It works like a teleportation point for the graph.",
|
|
55973
56013
|
TeleportOutBlock: "Endpoint for a TeleportInBlock.",
|
|
@@ -55985,6 +56025,7 @@ NodeListComponent._Tooltips = {
|
|
|
55985
56025
|
GeometryOutputBlock: "Output block used to gather the final geometry",
|
|
55986
56026
|
NullBlock: "Generate an empty geometry",
|
|
55987
56027
|
OptimizeBlock: "Eliminate vertices that share positions with another vertex",
|
|
56028
|
+
GeometryInfoBlock: "Provides information about a geometry",
|
|
55988
56029
|
};
|
|
55989
56030
|
|
|
55990
56031
|
|
|
@@ -56847,7 +56888,7 @@ class PropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component
|
|
|
56847
56888
|
core_Misc_tools__WEBPACK_IMPORTED_MODULE_5__.DataStorage.WriteBoolean("UseNM", false);
|
|
56848
56889
|
this.props.globalState.onPreviewModeChanged.notifyObservers();
|
|
56849
56890
|
this.forceUpdate();
|
|
56850
|
-
} }))] }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_sharedComponents_lineContainerComponent__WEBPACK_IMPORTED_MODULE_2__.LineContainerComponent, { title: "FILE", children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_sharedComponents_fileButtonLineComponent__WEBPACK_IMPORTED_MODULE_4__.FileButtonLineComponent, { label: "Load", onClick: (file) => this.load(file), accept: ".json" }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_buttonLineComponent__WEBPACK_IMPORTED_MODULE_22__.ButtonLineComponent, { label: "Save", onClick: () => {
|
|
56891
|
+
} }))] }), this.props.globalState.resyncHandler && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_sharedComponents_lineContainerComponent__WEBPACK_IMPORTED_MODULE_2__.LineContainerComponent, { title: "SYNC", children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_buttonLineComponent__WEBPACK_IMPORTED_MODULE_22__.ButtonLineComponent, { label: "Update mesh in scene", onClick: () => this.props.globalState.resyncHandler() }) })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_sharedComponents_lineContainerComponent__WEBPACK_IMPORTED_MODULE_2__.LineContainerComponent, { title: "FILE", children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_sharedComponents_fileButtonLineComponent__WEBPACK_IMPORTED_MODULE_4__.FileButtonLineComponent, { label: "Load", onClick: (file) => this.load(file), accept: ".json" }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_buttonLineComponent__WEBPACK_IMPORTED_MODULE_22__.ButtonLineComponent, { label: "Save", onClick: () => {
|
|
56851
56892
|
this.save();
|
|
56852
56893
|
} }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_buttonLineComponent__WEBPACK_IMPORTED_MODULE_22__.ButtonLineComponent, { label: "Generate code", onClick: () => {
|
|
56853
56894
|
shared_ui_components_stringTools__WEBPACK_IMPORTED_MODULE_3__.StringTools.DownloadAsFile(this.props.globalState.hostDocument, this.props.globalState.nodeGeometry.generateCode(), "code.txt");
|
|
@@ -57818,15 +57859,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
57818
57859
|
|
|
57819
57860
|
|
|
57820
57861
|
|
|
57862
|
+
const predicate = (b) => !!b.getExecutionIndex;
|
|
57821
57863
|
class InputDisplayManager {
|
|
57864
|
+
constructor() {
|
|
57865
|
+
this._hasHighlights = false;
|
|
57866
|
+
}
|
|
57822
57867
|
getHeaderClass(nodeData) {
|
|
57823
57868
|
const inputBlock = nodeData.data;
|
|
57824
57869
|
if (inputBlock.isContextual) {
|
|
57825
57870
|
return _inputDisplayManager_modules_scss__WEBPACK_IMPORTED_MODULE_1__["default"]["contextual"];
|
|
57826
57871
|
}
|
|
57827
|
-
if (inputBlock.visibleInInspector) {
|
|
57828
|
-
return _inputDisplayManager_modules_scss__WEBPACK_IMPORTED_MODULE_1__["default"]["inspector"];
|
|
57829
|
-
}
|
|
57830
57872
|
return "";
|
|
57831
57873
|
}
|
|
57832
57874
|
getHeaderText(nodeData) {
|
|
@@ -57862,6 +57904,12 @@ class InputDisplayManager {
|
|
|
57862
57904
|
case core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_2__.NodeGeometryContextualSources.VertexID:
|
|
57863
57905
|
value = "VertexID";
|
|
57864
57906
|
break;
|
|
57907
|
+
case core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_2__.NodeGeometryContextualSources.GeometryID:
|
|
57908
|
+
value = "GeometryID";
|
|
57909
|
+
break;
|
|
57910
|
+
case core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_2__.NodeGeometryContextualSources.CollectionID:
|
|
57911
|
+
value = "CollectionID";
|
|
57912
|
+
break;
|
|
57865
57913
|
case core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_2__.NodeGeometryContextualSources.FaceID:
|
|
57866
57914
|
value = "FaceID";
|
|
57867
57915
|
break;
|
|
@@ -57919,6 +57967,45 @@ class InputDisplayManager {
|
|
|
57919
57967
|
contentArea.innerHTML = value;
|
|
57920
57968
|
contentArea.classList.add(_inputDisplayManager_modules_scss__WEBPACK_IMPORTED_MODULE_1__["default"]["input-block"]);
|
|
57921
57969
|
}
|
|
57970
|
+
onSelectionChanged(nodeData, selectedData, manager) {
|
|
57971
|
+
const block = nodeData.data;
|
|
57972
|
+
if (!block.isContextual) {
|
|
57973
|
+
return;
|
|
57974
|
+
}
|
|
57975
|
+
const contextGenerationBlock = block.getDescendantOfPredicate(predicate);
|
|
57976
|
+
if (selectedData !== nodeData) {
|
|
57977
|
+
if (this._hasHighlights) {
|
|
57978
|
+
let removeHighlight;
|
|
57979
|
+
if (selectedData && selectedData.data.getClassName() === "GeometryInputBlock") {
|
|
57980
|
+
const otherSelection = selectedData.data;
|
|
57981
|
+
const otherContextGenerationBlock = otherSelection.getDescendantOfPredicate(predicate);
|
|
57982
|
+
removeHighlight = contextGenerationBlock !== otherContextGenerationBlock;
|
|
57983
|
+
}
|
|
57984
|
+
else {
|
|
57985
|
+
removeHighlight = true;
|
|
57986
|
+
}
|
|
57987
|
+
if (removeHighlight) {
|
|
57988
|
+
manager.onHighlightNodeObservable.notifyObservers({ data: contextGenerationBlock, active: false });
|
|
57989
|
+
}
|
|
57990
|
+
this._hasHighlights = false;
|
|
57991
|
+
}
|
|
57992
|
+
return;
|
|
57993
|
+
}
|
|
57994
|
+
if (contextGenerationBlock) {
|
|
57995
|
+
manager.onHighlightNodeObservable.notifyObservers({ data: contextGenerationBlock, active: true });
|
|
57996
|
+
this._hasHighlights = true;
|
|
57997
|
+
}
|
|
57998
|
+
}
|
|
57999
|
+
onDispose(nodeData, manager) {
|
|
58000
|
+
const block = nodeData.data;
|
|
58001
|
+
if (!block.isContextual) {
|
|
58002
|
+
return;
|
|
58003
|
+
}
|
|
58004
|
+
const contextGenerationBlock = block.getDescendantOfPredicate(predicate);
|
|
58005
|
+
if (contextGenerationBlock) {
|
|
58006
|
+
manager.onHighlightNodeObservable.notifyObservers({ data: contextGenerationBlock, active: false });
|
|
58007
|
+
}
|
|
58008
|
+
}
|
|
57922
58009
|
}
|
|
57923
58010
|
|
|
57924
58011
|
|
|
@@ -58456,13 +58543,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
58456
58543
|
/* harmony import */ var _sharedComponents_lineContainerComponent__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../sharedComponents/lineContainerComponent */ "../../../tools/nodeGeometryEditor/dist/sharedComponents/lineContainerComponent.js");
|
|
58457
58544
|
/* harmony import */ var _genericNodePropertyComponent__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./genericNodePropertyComponent */ "../../../tools/nodeGeometryEditor/dist/graphSystem/properties/genericNodePropertyComponent.js");
|
|
58458
58545
|
/* harmony import */ var _sharedComponents_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../sharedComponents/checkBoxLineComponent */ "../../../tools/nodeGeometryEditor/dist/sharedComponents/checkBoxLineComponent.js");
|
|
58459
|
-
/* harmony import */ var
|
|
58460
|
-
/* harmony import */ var
|
|
58461
|
-
/* harmony import */ var
|
|
58462
|
-
/* harmony import */ var
|
|
58463
|
-
/* harmony import */ var
|
|
58464
|
-
/* harmony import */ var core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_13__);
|
|
58465
|
-
|
|
58546
|
+
/* harmony import */ var shared_ui_components_lines_optionsLineComponent__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! shared-ui-components/lines/optionsLineComponent */ "../../../dev/sharedUiComponents/dist/lines/optionsLineComponent.js");
|
|
58547
|
+
/* harmony import */ var shared_ui_components_lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! shared-ui-components/lines/floatLineComponent */ "../../../dev/sharedUiComponents/dist/lines/floatLineComponent.js");
|
|
58548
|
+
/* harmony import */ var shared_ui_components_lines_sliderLineComponent__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! shared-ui-components/lines/sliderLineComponent */ "../../../dev/sharedUiComponents/dist/lines/sliderLineComponent.js");
|
|
58549
|
+
/* harmony import */ var core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! core/Meshes/Node/Enums/nodeGeometryContextualSources */ "core/Misc/observable");
|
|
58550
|
+
/* harmony import */ var core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_12__);
|
|
58466
58551
|
|
|
58467
58552
|
|
|
58468
58553
|
|
|
@@ -58498,29 +58583,29 @@ class InputPropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Compo
|
|
|
58498
58583
|
renderValue(globalState) {
|
|
58499
58584
|
const inputBlock = this.props.nodeData.data;
|
|
58500
58585
|
switch (inputBlock.type) {
|
|
58501
|
-
case
|
|
58502
|
-
case
|
|
58586
|
+
case core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_12__.NodeGeometryBlockConnectionPointTypes.Int:
|
|
58587
|
+
case core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_12__.NodeGeometryBlockConnectionPointTypes.Float: {
|
|
58503
58588
|
const cantDisplaySlider = isNaN(inputBlock.min) || isNaN(inputBlock.max) || inputBlock.min === inputBlock.max;
|
|
58504
|
-
const isIntger = inputBlock.type ===
|
|
58505
|
-
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
58589
|
+
const isIntger = inputBlock.type === core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_12__.NodeGeometryBlockConnectionPointTypes.Int;
|
|
58590
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_10__.FloatLineComponent, { lockObject: this.props.stateManager.lockObject, label: "Min", target: inputBlock, isInteger: isIntger, propertyName: "min", onChange: () => {
|
|
58506
58591
|
if (inputBlock.value < inputBlock.min) {
|
|
58507
58592
|
inputBlock.value = inputBlock.min;
|
|
58508
58593
|
}
|
|
58509
58594
|
this.forceUpdate();
|
|
58510
|
-
} }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
58595
|
+
} }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_10__.FloatLineComponent, { lockObject: this.props.stateManager.lockObject, label: "Max", target: inputBlock, isInteger: isIntger, propertyName: "max", onChange: () => {
|
|
58511
58596
|
if (inputBlock.value > inputBlock.max) {
|
|
58512
58597
|
inputBlock.value = inputBlock.max;
|
|
58513
58598
|
}
|
|
58514
58599
|
this.forceUpdate();
|
|
58515
|
-
} }), cantDisplaySlider && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_propertyTab_properties_floatPropertyTabComponent__WEBPACK_IMPORTED_MODULE_2__.FloatPropertyTabComponent, { globalState: globalState, inputBlock: inputBlock }), !cantDisplaySlider && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
58600
|
+
} }), cantDisplaySlider && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_propertyTab_properties_floatPropertyTabComponent__WEBPACK_IMPORTED_MODULE_2__.FloatPropertyTabComponent, { globalState: globalState, inputBlock: inputBlock }), !cantDisplaySlider && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_sliderLineComponent__WEBPACK_IMPORTED_MODULE_11__.SliderLineComponent, { lockObject: this.props.stateManager.lockObject, label: "Value", target: inputBlock, propertyName: "value", step: isIntger ? 1 : Math.abs(inputBlock.max - inputBlock.min) / 100.0, decimalCount: isIntger ? 0 : 2, minimum: Math.min(inputBlock.min, inputBlock.max), maximum: inputBlock.max, onChange: () => {
|
|
58516
58601
|
this.props.stateManager.onRebuildRequiredObservable.notifyObservers();
|
|
58517
58602
|
} }))] }));
|
|
58518
58603
|
}
|
|
58519
|
-
case
|
|
58604
|
+
case core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_12__.NodeGeometryBlockConnectionPointTypes.Vector2:
|
|
58520
58605
|
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_propertyTab_properties_vector2PropertyTabComponent__WEBPACK_IMPORTED_MODULE_3__.Vector2PropertyTabComponent, { lockObject: globalState.lockObject, globalState: globalState, inputBlock: inputBlock });
|
|
58521
|
-
case
|
|
58606
|
+
case core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_12__.NodeGeometryBlockConnectionPointTypes.Vector3:
|
|
58522
58607
|
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_propertyTab_properties_vector3PropertyTabComponent__WEBPACK_IMPORTED_MODULE_4__.Vector3PropertyTabComponent, { lockObject: globalState.lockObject, globalState: globalState, inputBlock: inputBlock });
|
|
58523
|
-
case
|
|
58608
|
+
case core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_12__.NodeGeometryBlockConnectionPointTypes.Vector4:
|
|
58524
58609
|
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_propertyTab_properties_vector4PropertyTabComponent__WEBPACK_IMPORTED_MODULE_5__.Vector4PropertyTabComponent, { lockObject: globalState.lockObject, globalState: globalState, inputBlock: inputBlock });
|
|
58525
58610
|
}
|
|
58526
58611
|
return null;
|
|
@@ -58531,74 +58616,48 @@ class InputPropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Compo
|
|
|
58531
58616
|
}
|
|
58532
58617
|
render() {
|
|
58533
58618
|
const inputBlock = this.props.nodeData.data;
|
|
58534
|
-
let contextualSourcesOptions = [{ label: "None", value:
|
|
58619
|
+
let contextualSourcesOptions = [{ label: "None", value: core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_12__.NodeGeometryContextualSources.None }];
|
|
58535
58620
|
switch (inputBlock.type) {
|
|
58536
|
-
case
|
|
58537
|
-
case
|
|
58621
|
+
case core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_12__.NodeGeometryBlockConnectionPointTypes.Float:
|
|
58622
|
+
case core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_12__.NodeGeometryBlockConnectionPointTypes.Int:
|
|
58538
58623
|
contextualSourcesOptions = [
|
|
58539
|
-
{ label: "Vertex ID", value:
|
|
58540
|
-
{ label: "Face ID", value:
|
|
58624
|
+
{ label: "Vertex ID", value: core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_12__.NodeGeometryContextualSources.VertexID },
|
|
58625
|
+
{ label: "Face ID", value: core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_12__.NodeGeometryContextualSources.FaceID },
|
|
58626
|
+
{ label: "Geometry ID", value: core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_12__.NodeGeometryContextualSources.GeometryID },
|
|
58627
|
+
{ label: "Collection ID", value: core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_12__.NodeGeometryContextualSources.CollectionID },
|
|
58541
58628
|
];
|
|
58542
58629
|
break;
|
|
58543
|
-
case
|
|
58630
|
+
case core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_12__.NodeGeometryBlockConnectionPointTypes.Vector2:
|
|
58544
58631
|
contextualSourcesOptions = [
|
|
58545
|
-
{ label: "UV1s", value:
|
|
58546
|
-
{ label: "UV2s", value:
|
|
58547
|
-
{ label: "UV3s", value:
|
|
58548
|
-
{ label: "UV4s", value:
|
|
58549
|
-
{ label: "UV5s", value:
|
|
58550
|
-
{ label: "UV6s", value:
|
|
58632
|
+
{ label: "UV1s", value: core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_12__.NodeGeometryContextualSources.UV },
|
|
58633
|
+
{ label: "UV2s", value: core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_12__.NodeGeometryContextualSources.UV2 },
|
|
58634
|
+
{ label: "UV3s", value: core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_12__.NodeGeometryContextualSources.UV3 },
|
|
58635
|
+
{ label: "UV4s", value: core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_12__.NodeGeometryContextualSources.UV4 },
|
|
58636
|
+
{ label: "UV5s", value: core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_12__.NodeGeometryContextualSources.UV5 },
|
|
58637
|
+
{ label: "UV6s", value: core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_12__.NodeGeometryContextualSources.UV6 },
|
|
58551
58638
|
];
|
|
58552
58639
|
break;
|
|
58553
|
-
case
|
|
58640
|
+
case core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_12__.NodeGeometryBlockConnectionPointTypes.Vector3:
|
|
58554
58641
|
contextualSourcesOptions = [
|
|
58555
|
-
{ label: "Positions", value:
|
|
58556
|
-
{ label: "Normals", value:
|
|
58642
|
+
{ label: "Positions", value: core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_12__.NodeGeometryContextualSources.Positions },
|
|
58643
|
+
{ label: "Normals", value: core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_12__.NodeGeometryContextualSources.Normals },
|
|
58557
58644
|
];
|
|
58558
58645
|
break;
|
|
58559
|
-
case
|
|
58646
|
+
case core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_12__.NodeGeometryBlockConnectionPointTypes.Vector4:
|
|
58560
58647
|
contextualSourcesOptions = [
|
|
58561
|
-
{ label: "Tangents", value:
|
|
58562
|
-
{ label: "Colors", value:
|
|
58648
|
+
{ label: "Tangents", value: core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_12__.NodeGeometryContextualSources.Tangents },
|
|
58649
|
+
{ label: "Colors", value: core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_12__.NodeGeometryContextualSources.Colors },
|
|
58563
58650
|
];
|
|
58564
58651
|
break;
|
|
58565
58652
|
}
|
|
58566
58653
|
const modeOptions = [{ label: "User-defined", value: 0 }];
|
|
58567
58654
|
if (contextualSourcesOptions.length > 0) {
|
|
58568
|
-
modeOptions.push({ label: "Contextual value (Integer)", value:
|
|
58569
|
-
modeOptions.push({ label: "Contextual value (Vector2)", value:
|
|
58570
|
-
modeOptions.push({ label: "Contextual value (Vector3)", value:
|
|
58571
|
-
modeOptions.push({ label: "Contextual value (Vector4)", value:
|
|
58572
|
-
}
|
|
58573
|
-
|
|
58574
|
-
{ label: "None", value: 0 },
|
|
58575
|
-
{ label: "Visible in the inspector", value: 1 },
|
|
58576
|
-
];
|
|
58577
|
-
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_genericNodePropertyComponent__WEBPACK_IMPORTED_MODULE_7__.GeneralPropertyTabComponent, { stateManager: this.props.stateManager, nodeData: this.props.nodeData }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_sharedComponents_lineContainerComponent__WEBPACK_IMPORTED_MODULE_6__.LineContainerComponent, { title: "PROPERTIES", children: [!inputBlock.isContextual && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_optionsLineComponent__WEBPACK_IMPORTED_MODULE_10__.OptionsLineComponent, { label: "Type", options: typeOptions, target: inputBlock, noDirectUpdate: true, extractValue: () => {
|
|
58578
|
-
if (inputBlock.visibleInInspector) {
|
|
58579
|
-
return 1;
|
|
58580
|
-
}
|
|
58581
|
-
return 0;
|
|
58582
|
-
}, onSelect: (value) => {
|
|
58583
|
-
switch (value) {
|
|
58584
|
-
case 0:
|
|
58585
|
-
inputBlock.visibleInInspector = false;
|
|
58586
|
-
break;
|
|
58587
|
-
case 1:
|
|
58588
|
-
inputBlock.visibleInInspector = true;
|
|
58589
|
-
break;
|
|
58590
|
-
case 2:
|
|
58591
|
-
inputBlock.visibleInInspector = false;
|
|
58592
|
-
break;
|
|
58593
|
-
}
|
|
58594
|
-
this.forceUpdate();
|
|
58595
|
-
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(inputBlock);
|
|
58596
|
-
this.props.stateManager.onRebuildRequiredObservable.notifyObservers();
|
|
58597
|
-
}, propertyName: "" })), inputBlock.visibleInInspector && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_9__.TextInputLineComponent, { label: "Group", propertyName: "groupInInspector", target: inputBlock, lockObject: this.props.stateManager.lockObject, onChange: () => {
|
|
58598
|
-
this.forceUpdate();
|
|
58599
|
-
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(inputBlock);
|
|
58600
|
-
this.props.stateManager.onRebuildRequiredObservable.notifyObservers();
|
|
58601
|
-
}, throttlePropertyChangedNotification: true })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_optionsLineComponent__WEBPACK_IMPORTED_MODULE_10__.OptionsLineComponent, { label: "Mode", options: modeOptions, target: inputBlock, noDirectUpdate: true, extractValue: () => {
|
|
58655
|
+
modeOptions.push({ label: "Contextual value (Integer)", value: core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_12__.NodeGeometryBlockConnectionPointTypes.Int });
|
|
58656
|
+
modeOptions.push({ label: "Contextual value (Vector2)", value: core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_12__.NodeGeometryBlockConnectionPointTypes.Vector2 });
|
|
58657
|
+
modeOptions.push({ label: "Contextual value (Vector3)", value: core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_12__.NodeGeometryBlockConnectionPointTypes.Vector3 });
|
|
58658
|
+
modeOptions.push({ label: "Contextual value (Vector4)", value: core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_12__.NodeGeometryBlockConnectionPointTypes.Vector4 });
|
|
58659
|
+
}
|
|
58660
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_genericNodePropertyComponent__WEBPACK_IMPORTED_MODULE_7__.GeneralPropertyTabComponent, { stateManager: this.props.stateManager, nodeData: this.props.nodeData }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_sharedComponents_lineContainerComponent__WEBPACK_IMPORTED_MODULE_6__.LineContainerComponent, { title: "PROPERTIES", children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_optionsLineComponent__WEBPACK_IMPORTED_MODULE_9__.OptionsLineComponent, { label: "Mode", options: modeOptions, target: inputBlock, noDirectUpdate: true, extractValue: () => {
|
|
58602
58661
|
if (inputBlock.isContextual) {
|
|
58603
58662
|
return inputBlock.type;
|
|
58604
58663
|
}
|
|
@@ -58610,17 +58669,17 @@ class InputPropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Compo
|
|
|
58610
58669
|
break;
|
|
58611
58670
|
default:
|
|
58612
58671
|
switch (value) {
|
|
58613
|
-
case
|
|
58614
|
-
inputBlock.contextualValue =
|
|
58672
|
+
case core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_12__.NodeGeometryBlockConnectionPointTypes.Int:
|
|
58673
|
+
inputBlock.contextualValue = core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_12__.NodeGeometryContextualSources.VertexID;
|
|
58615
58674
|
break;
|
|
58616
|
-
case
|
|
58617
|
-
inputBlock.contextualValue =
|
|
58675
|
+
case core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_12__.NodeGeometryBlockConnectionPointTypes.Vector2:
|
|
58676
|
+
inputBlock.contextualValue = core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_12__.NodeGeometryContextualSources.UV;
|
|
58618
58677
|
break;
|
|
58619
|
-
case
|
|
58620
|
-
inputBlock.contextualValue =
|
|
58678
|
+
case core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_12__.NodeGeometryBlockConnectionPointTypes.Vector3:
|
|
58679
|
+
inputBlock.contextualValue = core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_12__.NodeGeometryContextualSources.Positions;
|
|
58621
58680
|
break;
|
|
58622
|
-
case
|
|
58623
|
-
inputBlock.contextualValue =
|
|
58681
|
+
case core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_12__.NodeGeometryBlockConnectionPointTypes.Vector4:
|
|
58682
|
+
inputBlock.contextualValue = core_Meshes_Node_Enums_nodeGeometryConnectionPointTypes__WEBPACK_IMPORTED_MODULE_12__.NodeGeometryContextualSources.Colors;
|
|
58624
58683
|
break;
|
|
58625
58684
|
}
|
|
58626
58685
|
break;
|
|
@@ -58628,7 +58687,7 @@ class InputPropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Compo
|
|
|
58628
58687
|
this.forceUpdate();
|
|
58629
58688
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(inputBlock);
|
|
58630
58689
|
this.props.stateManager.onRebuildRequiredObservable.notifyObservers();
|
|
58631
|
-
}, propertyName: "" }), !inputBlock.isContextual && this.renderValue(this.props.stateManager.data), inputBlock.isContextual && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
58690
|
+
}, propertyName: "" }), !inputBlock.isContextual && this.renderValue(this.props.stateManager.data), inputBlock.isContextual && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_optionsLineComponent__WEBPACK_IMPORTED_MODULE_9__.OptionsLineComponent, { label: "Contextual value", options: contextualSourcesOptions, target: inputBlock, propertyName: "contextualValue", onSelect: (value) => {
|
|
58632
58691
|
inputBlock.contextualValue = value;
|
|
58633
58692
|
this.forceUpdate();
|
|
58634
58693
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(inputBlock);
|
|
@@ -58690,7 +58749,7 @@ class MeshPropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Compon
|
|
|
58690
58749
|
if (meshes.length) {
|
|
58691
58750
|
const block = this.props.nodeData.data;
|
|
58692
58751
|
block.mesh = meshes[0];
|
|
58693
|
-
this.props.stateManager.
|
|
58752
|
+
this.props.stateManager.onRebuildRequiredObservable.notifyObservers();
|
|
58694
58753
|
}
|
|
58695
58754
|
this.forceUpdate();
|
|
58696
58755
|
}
|
|
@@ -58726,7 +58785,7 @@ class MeshPropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Compon
|
|
|
58726
58785
|
return meshIndex;
|
|
58727
58786
|
}
|
|
58728
58787
|
return -1;
|
|
58729
|
-
} }))] })] }));
|
|
58788
|
+
} })), !scene && !!block.mesh && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_textLineComponent__WEBPACK_IMPORTED_MODULE_6__.TextLineComponent, { ignoreValue: true, label: `Mesh ${block.mesh.name} defined by code` }), !scene && !!block.isUsingCachedData && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_textLineComponent__WEBPACK_IMPORTED_MODULE_6__.TextLineComponent, { ignoreValue: true, label: `Block is using cached data` })] })] }));
|
|
58730
58789
|
}
|
|
58731
58790
|
}
|
|
58732
58791
|
|
|
@@ -59269,6 +59328,13 @@ class NodeGeometryEditor {
|
|
|
59269
59328
|
globalState.hostWindow.addEventListener("beforeunload", () => {
|
|
59270
59329
|
globalState.onPopupClosedObservable.notifyObservers();
|
|
59271
59330
|
});
|
|
59331
|
+
// Resync
|
|
59332
|
+
if (options.hostMesh) {
|
|
59333
|
+
globalState.resyncHandler = () => {
|
|
59334
|
+
options.nodeGeometry.build();
|
|
59335
|
+
options.nodeGeometry.updateMesh(options.hostMesh);
|
|
59336
|
+
};
|
|
59337
|
+
}
|
|
59272
59338
|
// Close the popup window when the page is refreshed or scene is disposed
|
|
59273
59339
|
const popupWindow = _sharedComponents_popup__WEBPACK_IMPORTED_MODULE_4__.Popup["node-geometry-editor"];
|
|
59274
59340
|
if (globalState.nodeGeometry && options.hostScene && popupWindow) {
|