@babylonjs/node-editor 5.13.1 → 5.14.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.
|
@@ -61460,8 +61460,18 @@ class ColorComponentEntry extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
|
|
|
61460
61460
|
}
|
|
61461
61461
|
this.props.onChange(valueAsNumber);
|
|
61462
61462
|
}
|
|
61463
|
+
lock() {
|
|
61464
|
+
if (this.props.lockObject) {
|
|
61465
|
+
this.props.lockObject.lock = true;
|
|
61466
|
+
}
|
|
61467
|
+
}
|
|
61468
|
+
unlock() {
|
|
61469
|
+
if (this.props.lockObject) {
|
|
61470
|
+
this.props.lockObject.lock = false;
|
|
61471
|
+
}
|
|
61472
|
+
}
|
|
61463
61473
|
render() {
|
|
61464
|
-
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ className: "color-picker-component" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "color-picker-component-value" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("input", { type: "number", step: 1, className: "numeric-input", value: this.props.value, onChange: (evt) => this.updateValue(evt.target.value), disabled: this.props.disabled }) })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "color-picker-component-label" }, { children: this.props.label }))] })));
|
|
61474
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ className: "color-picker-component" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "color-picker-component-value" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("input", { type: "number", step: 1, className: "numeric-input", value: this.props.value, onBlur: () => this.unlock(), onFocus: () => this.lock(), onChange: (evt) => this.updateValue(evt.target.value), disabled: this.props.disabled }) })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "color-picker-component-label" }, { children: this.props.label }))] })));
|
|
61465
61475
|
}
|
|
61466
61476
|
}
|
|
61467
61477
|
|
|
@@ -61597,19 +61607,19 @@ class ColorPicker extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
|
|
|
61597
61607
|
} }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "color-picker-hue-slider", ref: this._hueRef, onPointerMove: (e) => this.onHuePointerMove(e), onPointerDown: (e) => this.onHuePointerDown(e), onPointerUp: (e) => this.onHuePointerUp(e) }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "color-picker-hue-cursor", style: {
|
|
61598
61608
|
left: `${(hsv.r / 360.0) * 100}%`,
|
|
61599
61609
|
border: `1px solid ` + colorHexRef,
|
|
61600
|
-
} }) }))] })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "color-picker-alpha" }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ className: "color-picker-rgb" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "red" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_colorComponentEntry__WEBPACK_IMPORTED_MODULE_3__.ColorComponentEntry, { label: "R", min: 0, max: 255, value: Math.round(this.state.color.r * 255), onChange: (value) => {
|
|
61610
|
+
} }) }))] })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "color-picker-alpha" }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ className: "color-picker-rgb" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "red" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_colorComponentEntry__WEBPACK_IMPORTED_MODULE_3__.ColorComponentEntry, { lockObject: this.props.lockObject, label: "R", min: 0, max: 255, value: Math.round(this.state.color.r * 255), onChange: (value) => {
|
|
61601
61611
|
this.state.color.r = value / 255.0;
|
|
61602
61612
|
this.forceUpdate();
|
|
61603
|
-
} }) })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "green" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_colorComponentEntry__WEBPACK_IMPORTED_MODULE_3__.ColorComponentEntry, { label: "G", min: 0, max: 255, value: Math.round(this.state.color.g * 255), onChange: (value) => {
|
|
61613
|
+
} }) })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "green" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_colorComponentEntry__WEBPACK_IMPORTED_MODULE_3__.ColorComponentEntry, { lockObject: this.props.lockObject, label: "G", min: 0, max: 255, value: Math.round(this.state.color.g * 255), onChange: (value) => {
|
|
61604
61614
|
this.state.color.g = value / 255.0;
|
|
61605
61615
|
this.forceUpdate();
|
|
61606
|
-
} }) })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "blue" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_colorComponentEntry__WEBPACK_IMPORTED_MODULE_3__.ColorComponentEntry, { label: "B", min: 0, max: 255, value: Math.round(this.state.color.b * 255), onChange: (value) => {
|
|
61616
|
+
} }) })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "blue" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_colorComponentEntry__WEBPACK_IMPORTED_MODULE_3__.ColorComponentEntry, { lockObject: this.props.lockObject, label: "B", min: 0, max: 255, value: Math.round(this.state.color.b * 255), onChange: (value) => {
|
|
61607
61617
|
this.state.color.b = value / 255.0;
|
|
61608
61618
|
this.forceUpdate();
|
|
61609
|
-
} }) })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "alpha" + (hasAlpha ? "" : " grayed") }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_colorComponentEntry__WEBPACK_IMPORTED_MODULE_3__.ColorComponentEntry, { label: "A", min: 0, max: 255, value: Math.round(this.state.alpha * 255), onChange: (value) => {
|
|
61619
|
+
} }) })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "alpha" + (hasAlpha ? "" : " grayed") }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_colorComponentEntry__WEBPACK_IMPORTED_MODULE_3__.ColorComponentEntry, { lockObject: this.props.lockObject, label: "A", min: 0, max: 255, value: Math.round(this.state.alpha * 255), onChange: (value) => {
|
|
61610
61620
|
this.setState({ alpha: value / 255.0 });
|
|
61611
61621
|
this.forceUpdate();
|
|
61612
|
-
} }) }))] })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ className: "color-picker-hex" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "color-picker-hex-label" }, { children: "Hex" })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "color-picker-hex-value" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_hexColor__WEBPACK_IMPORTED_MODULE_4__.HexColor, { expectedLength: hasAlpha ? 8 : 6, value: colorHex, onChange: (value) => {
|
|
61622
|
+
} }) }))] })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ className: "color-picker-hex" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "color-picker-hex-label" }, { children: "Hex" })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "color-picker-hex-value" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_hexColor__WEBPACK_IMPORTED_MODULE_4__.HexColor, { lockObject: this.props.lockObject, expectedLength: hasAlpha ? 8 : 6, value: colorHex, onChange: (value) => {
|
|
61613
61623
|
if (hasAlpha) {
|
|
61614
61624
|
const color4 = core_Maths_math_color__WEBPACK_IMPORTED_MODULE_2__.Color4.FromHexString(value);
|
|
61615
61625
|
this.setState({ color: new core_Maths_math_color__WEBPACK_IMPORTED_MODULE_2__.Color3(color4.r, color4.g, color4.b), alpha: color4.a });
|
|
@@ -61650,6 +61660,16 @@ class HexColor extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
|
|
|
61650
61660
|
}
|
|
61651
61661
|
return true;
|
|
61652
61662
|
}
|
|
61663
|
+
lock() {
|
|
61664
|
+
if (this.props.lockObject) {
|
|
61665
|
+
this.props.lockObject.lock = true;
|
|
61666
|
+
}
|
|
61667
|
+
}
|
|
61668
|
+
unlock() {
|
|
61669
|
+
if (this.props.lockObject) {
|
|
61670
|
+
this.props.lockObject.lock = false;
|
|
61671
|
+
}
|
|
61672
|
+
}
|
|
61653
61673
|
updateHexValue(valueString) {
|
|
61654
61674
|
if (valueString != "" && /^[0-9A-Fa-f]+$/g.test(valueString) == false) {
|
|
61655
61675
|
return;
|
|
@@ -61661,7 +61681,7 @@ class HexColor extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
|
|
|
61661
61681
|
this.props.onChange("#" + valueString);
|
|
61662
61682
|
}
|
|
61663
61683
|
render() {
|
|
61664
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("input", { type: "string", className: "hex-input", value: this.state.hex, onChange: (evt) => this.updateHexValue(evt.target.value) });
|
|
61684
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("input", { type: "string", className: "hex-input", value: this.state.hex, onBlur: () => this.unlock(), onFocus: () => this.lock(), onChange: (evt) => this.updateHexValue(evt.target.value) }));
|
|
61665
61685
|
}
|
|
61666
61686
|
}
|
|
61667
61687
|
|
|
@@ -61911,11 +61931,11 @@ class ColorLineComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
|
|
|
61911
61931
|
}
|
|
61912
61932
|
render() {
|
|
61913
61933
|
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_5__.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_5__.faPlus });
|
|
61914
|
-
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ className: "color3Line" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ 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", Object.assign({ className: "label", title: this.props.label }, { children: this.props.label })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "color3" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_colorPickerComponent__WEBPACK_IMPORTED_MODULE_6__.ColorPickerLineComponent, { linearHint: this.props.isLinear, value: this.props.disableAlpha ? this._toColor3(this.state.color) : this.state.color, onColorChanged: (colorString) => {
|
|
61934
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ className: "color3Line" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ 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", Object.assign({ className: "label", title: this.props.label }, { children: this.props.label })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "color3" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_colorPickerComponent__WEBPACK_IMPORTED_MODULE_6__.ColorPickerLineComponent, { lockObject: this.props.lockObject, linearHint: this.props.isLinear, value: this.props.disableAlpha ? this._toColor3(this.state.color) : this.state.color, onColorChanged: (colorString) => {
|
|
61915
61935
|
this.setColorFromString(colorString);
|
|
61916
61936
|
} }) })), this.props.lockObject && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_textInputLineComponent__WEBPACK_IMPORTED_MODULE_7__.TextInputLineComponent, { lockObject: this.props.lockObject, label: "", value: this.state.color.toHexString(), onChange: (newValue) => {
|
|
61917
61937
|
this.setColorFromString(newValue);
|
|
61918
|
-
}, onPropertyChangedObservable: this.props.onPropertyChangedObservable })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "copy hoverIcon", onClick: () => this.copyToClipboard(), title: "Copy to clipboard" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("img", { src: _copy_svg__WEBPACK_IMPORTED_MODULE_9__, alt: "Copy" }) })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "expand hoverIcon", onClick: () => this.switchExpandState(), title: "Expand" }, { children: chevron }))] })), this.state.isExpanded && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ className: "secondLine" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_numericInputComponent__WEBPACK_IMPORTED_MODULE_3__.NumericInputComponent, { label: "r", value: this.state.color.r, onChange: (value) => this.updateStateR(value) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_numericInputComponent__WEBPACK_IMPORTED_MODULE_3__.NumericInputComponent, { label: "g", value: this.state.color.g, onChange: (value) => this.updateStateG(value) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_numericInputComponent__WEBPACK_IMPORTED_MODULE_3__.NumericInputComponent, { label: "b", value: this.state.color.b, onChange: (value) => this.updateStateB(value) }), this.props.disableAlpha || (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_numericInputComponent__WEBPACK_IMPORTED_MODULE_3__.NumericInputComponent, { label: "a", value: this.state.color.a, onChange: (value) => this.updateStateA(value) })] })))] })));
|
|
61938
|
+
}, onPropertyChangedObservable: this.props.onPropertyChangedObservable })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "copy hoverIcon", onClick: () => this.copyToClipboard(), title: "Copy to clipboard" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("img", { src: _copy_svg__WEBPACK_IMPORTED_MODULE_9__, alt: "Copy" }) })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "expand hoverIcon", onClick: () => this.switchExpandState(), title: "Expand" }, { children: chevron }))] })), this.state.isExpanded && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ className: "secondLine" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_numericInputComponent__WEBPACK_IMPORTED_MODULE_3__.NumericInputComponent, { lockObject: this.props.lockObject, label: "r", value: this.state.color.r, onChange: (value) => this.updateStateR(value) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_numericInputComponent__WEBPACK_IMPORTED_MODULE_3__.NumericInputComponent, { lockObject: this.props.lockObject, label: "g", value: this.state.color.g, onChange: (value) => this.updateStateG(value) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_numericInputComponent__WEBPACK_IMPORTED_MODULE_3__.NumericInputComponent, { lockObject: this.props.lockObject, label: "b", value: this.state.color.b, onChange: (value) => this.updateStateB(value) }), this.props.disableAlpha || ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_numericInputComponent__WEBPACK_IMPORTED_MODULE_3__.NumericInputComponent, { lockObject: this.props.lockObject, label: "a", value: this.state.color.a, onChange: (value) => this.updateStateA(value) }))] })))] })));
|
|
61919
61939
|
}
|
|
61920
61940
|
}
|
|
61921
61941
|
|
|
@@ -61989,7 +62009,7 @@ class ColorPickerLineComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Compon
|
|
|
61989
62009
|
return;
|
|
61990
62010
|
}
|
|
61991
62011
|
this.setState({ pickerEnabled: false });
|
|
61992
|
-
} }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "color-picker-float", ref: this._floatRef }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_colorPicker_colorPicker__WEBPACK_IMPORTED_MODULE_2__.ColorPicker, { color: this.state.color, linearhint: this.props.linearHint, onColorChanged: (color) => {
|
|
62012
|
+
} }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "color-picker-float", ref: this._floatRef }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_colorPicker_colorPicker__WEBPACK_IMPORTED_MODULE_2__.ColorPicker, { lockObject: this.props.lockObject || {}, color: this.state.color, linearhint: this.props.linearHint, onColorChanged: (color) => {
|
|
61993
62013
|
const hex = color.toHexString();
|
|
61994
62014
|
this.setState({ hex, color });
|
|
61995
62015
|
this.props.onColorChanged(hex);
|
|
@@ -62363,7 +62383,7 @@ class MatrixLineComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
|
|
|
62363
62383
|
if (this.props.onModeChange) {
|
|
62364
62384
|
this.props.onModeChange(value);
|
|
62365
62385
|
}
|
|
62366
|
-
} }) })), this.state.mode === 0 && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ className: "secondLine" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_vector4LineComponent__WEBPACK_IMPORTED_MODULE_3__.Vector4LineComponent, { label: "Row #0", value: this.state.value.getRow(0), onChange: (value) => this.updateRow(value, 0) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_vector4LineComponent__WEBPACK_IMPORTED_MODULE_3__.Vector4LineComponent, { label: "Row #1", value: this.state.value.getRow(1), onChange: (value) => this.updateRow(value, 1) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_vector4LineComponent__WEBPACK_IMPORTED_MODULE_3__.Vector4LineComponent, { label: "Row #2", value: this.state.value.getRow(2), onChange: (value) => this.updateRow(value, 2) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_vector4LineComponent__WEBPACK_IMPORTED_MODULE_3__.Vector4LineComponent, { label: "Row #3", value: this.state.value.getRow(3), onChange: (value) => this.updateRow(value, 3) })] }))), this.state.mode !== 0 && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "secondLine" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_sliderLineComponent__WEBPACK_IMPORTED_MODULE_5__.SliderLineComponent, { label: "Angle", minimum: 0, maximum: 2 * Math.PI, useEuler: true, step: 0.1, directValue: this.state.angle, onChange: (value) => this.updateBasedOnMode(value) }) })))] })));
|
|
62386
|
+
} }) })), this.state.mode === 0 && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ className: "secondLine" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_vector4LineComponent__WEBPACK_IMPORTED_MODULE_3__.Vector4LineComponent, { lockObject: this.props.lockObject, label: "Row #0", value: this.state.value.getRow(0), onChange: (value) => this.updateRow(value, 0) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_vector4LineComponent__WEBPACK_IMPORTED_MODULE_3__.Vector4LineComponent, { lockObject: this.props.lockObject, label: "Row #1", value: this.state.value.getRow(1), onChange: (value) => this.updateRow(value, 1) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_vector4LineComponent__WEBPACK_IMPORTED_MODULE_3__.Vector4LineComponent, { lockObject: this.props.lockObject, label: "Row #2", value: this.state.value.getRow(2), onChange: (value) => this.updateRow(value, 2) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_vector4LineComponent__WEBPACK_IMPORTED_MODULE_3__.Vector4LineComponent, { lockObject: this.props.lockObject, label: "Row #3", value: this.state.value.getRow(3), onChange: (value) => this.updateRow(value, 3) })] }))), this.state.mode !== 0 && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "secondLine" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_sliderLineComponent__WEBPACK_IMPORTED_MODULE_5__.SliderLineComponent, { label: "Angle", minimum: 0, maximum: 2 * Math.PI, useEuler: true, step: 0.1, directValue: this.state.angle, onChange: (value) => this.updateBasedOnMode(value) }) })))] })));
|
|
62367
62387
|
}
|
|
62368
62388
|
}
|
|
62369
62389
|
|
|
@@ -62391,6 +62411,11 @@ class NumericInputComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component
|
|
|
62391
62411
|
this._localChange = false;
|
|
62392
62412
|
this.state = { value: this.props.value.toFixed(this.props.precision !== undefined ? this.props.precision : 3) };
|
|
62393
62413
|
}
|
|
62414
|
+
componentWillUnmount() {
|
|
62415
|
+
if (this.props.lockObject) {
|
|
62416
|
+
this.props.lockObject.lock = false;
|
|
62417
|
+
}
|
|
62418
|
+
}
|
|
62394
62419
|
shouldComponentUpdate(nextProps, nextState) {
|
|
62395
62420
|
if (this._localChange) {
|
|
62396
62421
|
return true;
|
|
@@ -62417,6 +62442,9 @@ class NumericInputComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component
|
|
|
62417
62442
|
onBlur() {
|
|
62418
62443
|
this._localChange = false;
|
|
62419
62444
|
const valueAsNumber = parseFloat(this.state.value);
|
|
62445
|
+
if (this.props.lockObject) {
|
|
62446
|
+
this.props.lockObject.lock = false;
|
|
62447
|
+
}
|
|
62420
62448
|
if (isNaN(valueAsNumber)) {
|
|
62421
62449
|
this.props.onChange(this.props.value);
|
|
62422
62450
|
return;
|
|
@@ -62424,7 +62452,11 @@ class NumericInputComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component
|
|
|
62424
62452
|
this.props.onChange(valueAsNumber);
|
|
62425
62453
|
}
|
|
62426
62454
|
render() {
|
|
62427
|
-
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ className: "numeric" }, { 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" }), this.props.label && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "numeric-label", title: this.props.label }, { children: `${this.props.label}: ` }))), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("input", { type: "number", step: this.props.step, className: "numeric-input", value: this.state.value, onChange: (evt) => this.updateValue(evt),
|
|
62455
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ className: "numeric" }, { 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" }), this.props.label && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "numeric-label", title: this.props.label }, { children: `${this.props.label}: ` }))), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("input", { type: "number", step: this.props.step, className: "numeric-input", value: this.state.value, onChange: (evt) => this.updateValue(evt), onFocus: () => {
|
|
62456
|
+
if (this.props.lockObject) {
|
|
62457
|
+
this.props.lockObject.lock = true;
|
|
62458
|
+
}
|
|
62459
|
+
}, onBlur: () => this.onBlur() })] })));
|
|
62428
62460
|
}
|
|
62429
62461
|
}
|
|
62430
62462
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
@@ -62861,6 +62893,53 @@ class TextInputLineComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Componen
|
|
|
62861
62893
|
}
|
|
62862
62894
|
|
|
62863
62895
|
|
|
62896
|
+
/***/ }),
|
|
62897
|
+
|
|
62898
|
+
/***/ "../../../dev/sharedUiComponents/dist/lines/textLineComponent.js":
|
|
62899
|
+
/*!***********************************************************************!*\
|
|
62900
|
+
!*** ../../../dev/sharedUiComponents/dist/lines/textLineComponent.js ***!
|
|
62901
|
+
\***********************************************************************/
|
|
62902
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
62903
|
+
|
|
62904
|
+
"use strict";
|
|
62905
|
+
__webpack_require__.r(__webpack_exports__);
|
|
62906
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
62907
|
+
/* harmony export */ "TextLineComponent": () => (/* binding */ TextLineComponent)
|
|
62908
|
+
/* harmony export */ });
|
|
62909
|
+
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "../../../../node_modules/react/jsx-runtime.js");
|
|
62910
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "../../../../node_modules/react/index.js");
|
|
62911
|
+
|
|
62912
|
+
|
|
62913
|
+
class TextLineComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
|
|
62914
|
+
constructor(props) {
|
|
62915
|
+
super(props);
|
|
62916
|
+
}
|
|
62917
|
+
onLink() {
|
|
62918
|
+
if (this.props.url) {
|
|
62919
|
+
window.open(this.props.url, "_blank");
|
|
62920
|
+
return;
|
|
62921
|
+
}
|
|
62922
|
+
if (!this.props.onLink) {
|
|
62923
|
+
return;
|
|
62924
|
+
}
|
|
62925
|
+
this.props.onLink();
|
|
62926
|
+
}
|
|
62927
|
+
renderContent() {
|
|
62928
|
+
if (this.props.ignoreValue) {
|
|
62929
|
+
return null;
|
|
62930
|
+
}
|
|
62931
|
+
if (this.props.onLink || this.props.url) {
|
|
62932
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "link-value", title: this.props.value, onClick: () => this.onLink() }, { children: this.props.url ? "doc" : this.props.value || "no name" })));
|
|
62933
|
+
}
|
|
62934
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "value", title: this.props.value, style: { color: this.props.color ? this.props.color : "" } }, { children: this.props.value || "no name" })));
|
|
62935
|
+
}
|
|
62936
|
+
render() {
|
|
62937
|
+
var _a, _b, _c;
|
|
62938
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ className: this.props.underline ? "textLine underline" : "textLine" + (this.props.additionalClass ? " " + this.props.additionalClass : "") }, { 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", Object.assign({ className: "label", title: (_b = (_a = this.props.tooltip) !== null && _a !== void 0 ? _a : this.props.label) !== null && _b !== void 0 ? _b : "" }, { children: (_c = this.props.label) !== null && _c !== void 0 ? _c : "" })), this.renderContent()] })));
|
|
62939
|
+
}
|
|
62940
|
+
}
|
|
62941
|
+
|
|
62942
|
+
|
|
62864
62943
|
/***/ }),
|
|
62865
62944
|
|
|
62866
62945
|
/***/ "../../../dev/sharedUiComponents/dist/lines/vector2LineComponent.js":
|
|
@@ -62935,7 +63014,7 @@ class Vector2LineComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component
|
|
|
62935
63014
|
}
|
|
62936
63015
|
render() {
|
|
62937
63016
|
const chevron = this.state.isExpanded ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_fortawesome_react_fontawesome__WEBPACK_IMPORTED_MODULE_3__.FontAwesomeIcon, { icon: _fortawesome_free_solid_svg_icons__WEBPACK_IMPORTED_MODULE_4__.faMinus }) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_fortawesome_react_fontawesome__WEBPACK_IMPORTED_MODULE_3__.FontAwesomeIcon, { icon: _fortawesome_free_solid_svg_icons__WEBPACK_IMPORTED_MODULE_4__.faPlus });
|
|
62938
|
-
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ className: "vector3Line" }, { 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__.jsxs)("div", Object.assign({ className: "firstLine", title: this.props.label }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "label" }, { children: this.props.label })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "vector" }, { children: `X: ${this.state.value.x.toFixed(2)}, Y: ${this.state.value.y.toFixed(2)}` })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "expand hoverIcon", onClick: () => this.switchExpandState(), title: "Expand" }, { children: chevron }))] })), this.state.isExpanded && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ className: "secondLine" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_numericInputComponent__WEBPACK_IMPORTED_MODULE_2__.NumericInputComponent, { label: "x", step: this.props.step, value: this.state.value.x, onChange: (value) => this.updateStateX(value) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_numericInputComponent__WEBPACK_IMPORTED_MODULE_2__.NumericInputComponent, { label: "y", step: this.props.step, value: this.state.value.y, onChange: (value) => this.updateStateY(value) })] })))] })));
|
|
63017
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ className: "vector3Line" }, { 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__.jsxs)("div", Object.assign({ className: "firstLine", title: this.props.label }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "label" }, { children: this.props.label })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "vector" }, { children: `X: ${this.state.value.x.toFixed(2)}, Y: ${this.state.value.y.toFixed(2)}` })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "expand hoverIcon", onClick: () => this.switchExpandState(), title: "Expand" }, { children: chevron }))] })), this.state.isExpanded && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ className: "secondLine" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_numericInputComponent__WEBPACK_IMPORTED_MODULE_2__.NumericInputComponent, { lockObject: this.props.lockObject, label: "x", step: this.props.step, value: this.state.value.x, onChange: (value) => this.updateStateX(value) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_numericInputComponent__WEBPACK_IMPORTED_MODULE_2__.NumericInputComponent, { lockObject: this.props.lockObject, label: "y", step: this.props.step, value: this.state.value.y, onChange: (value) => this.updateStateY(value) })] })))] })));
|
|
62939
63018
|
}
|
|
62940
63019
|
}
|
|
62941
63020
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
@@ -63032,7 +63111,7 @@ class Vector3LineComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component
|
|
|
63032
63111
|
render() {
|
|
63033
63112
|
const chevron = this.state.isExpanded ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_fortawesome_react_fontawesome__WEBPACK_IMPORTED_MODULE_3__.FontAwesomeIcon, { icon: _fortawesome_free_solid_svg_icons__WEBPACK_IMPORTED_MODULE_4__.faMinus }) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_fortawesome_react_fontawesome__WEBPACK_IMPORTED_MODULE_3__.FontAwesomeIcon, { icon: _fortawesome_free_solid_svg_icons__WEBPACK_IMPORTED_MODULE_4__.faPlus });
|
|
63034
63113
|
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ className: "vector3Line" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ 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", Object.assign({ className: "label", title: this.props.label }, { children: this.props.label })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ 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 &&
|
|
63035
|
-
`X: ${core_Misc_tools__WEBPACK_IMPORTED_MODULE_6__.Tools.ToDegrees(this.state.value.x).toFixed(2)}, Y: ${core_Misc_tools__WEBPACK_IMPORTED_MODULE_6__.Tools.ToDegrees(this.state.value.y).toFixed(2)}, Z: ${core_Misc_tools__WEBPACK_IMPORTED_MODULE_6__.Tools.ToDegrees(this.state.value.z).toFixed(2)}`] })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ 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", Object.assign({ className: "secondLine" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_lines_numericInputComponent__WEBPACK_IMPORTED_MODULE_2__.NumericInputComponent, { label: "x", 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_2__.NumericInputComponent, { label: "y", 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_2__.NumericInputComponent, { label: "z", 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", Object.assign({ className: "secondLine" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_lines_sliderLineComponent__WEBPACK_IMPORTED_MODULE_5__.SliderLineComponent, { margin: true, label: "x", minimum: 0, maximum: 360, step: 0.1, directValue: core_Misc_tools__WEBPACK_IMPORTED_MODULE_6__.Tools.ToDegrees(this.state.value.x), onChange: (value) => this.updateStateX(core_Misc_tools__WEBPACK_IMPORTED_MODULE_6__.Tools.ToRadians(value)) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_lines_sliderLineComponent__WEBPACK_IMPORTED_MODULE_5__.SliderLineComponent, { margin: true, label: "y", minimum: 0, maximum: 360, step: 0.1, directValue: core_Misc_tools__WEBPACK_IMPORTED_MODULE_6__.Tools.ToDegrees(this.state.value.y), onChange: (value) => this.updateStateY(core_Misc_tools__WEBPACK_IMPORTED_MODULE_6__.Tools.ToRadians(value)) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_lines_sliderLineComponent__WEBPACK_IMPORTED_MODULE_5__.SliderLineComponent, { margin: true, label: "z", minimum: 0, maximum: 360, step: 0.1, directValue: core_Misc_tools__WEBPACK_IMPORTED_MODULE_6__.Tools.ToDegrees(this.state.value.z), onChange: (value) => this.updateStateZ(core_Misc_tools__WEBPACK_IMPORTED_MODULE_6__.Tools.ToRadians(value)) })] }))), this.state.isExpanded && this.props.useEuler && this.props.noSlider && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ className: "secondLine" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_lines_numericInputComponent__WEBPACK_IMPORTED_MODULE_2__.NumericInputComponent, { label: "x", step: this.props.step, value: core_Misc_tools__WEBPACK_IMPORTED_MODULE_6__.Tools.ToDegrees(this.state.value.x), onChange: (value) => this.updateStateX(core_Misc_tools__WEBPACK_IMPORTED_MODULE_6__.Tools.ToRadians(value)) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_lines_numericInputComponent__WEBPACK_IMPORTED_MODULE_2__.NumericInputComponent, { label: "y", step: this.props.step, value: core_Misc_tools__WEBPACK_IMPORTED_MODULE_6__.Tools.ToDegrees(this.state.value.y), onChange: (value) => this.updateStateY(core_Misc_tools__WEBPACK_IMPORTED_MODULE_6__.Tools.ToRadians(value)) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_lines_numericInputComponent__WEBPACK_IMPORTED_MODULE_2__.NumericInputComponent, { label: "z", step: this.props.step, value: core_Misc_tools__WEBPACK_IMPORTED_MODULE_6__.Tools.ToDegrees(this.state.value.z), onChange: (value) => this.updateStateZ(core_Misc_tools__WEBPACK_IMPORTED_MODULE_6__.Tools.ToRadians(value)) })] })))] })));
|
|
63114
|
+
`X: ${core_Misc_tools__WEBPACK_IMPORTED_MODULE_6__.Tools.ToDegrees(this.state.value.x).toFixed(2)}, Y: ${core_Misc_tools__WEBPACK_IMPORTED_MODULE_6__.Tools.ToDegrees(this.state.value.y).toFixed(2)}, Z: ${core_Misc_tools__WEBPACK_IMPORTED_MODULE_6__.Tools.ToDegrees(this.state.value.z).toFixed(2)}`] })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ 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", Object.assign({ className: "secondLine" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_lines_numericInputComponent__WEBPACK_IMPORTED_MODULE_2__.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_2__.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_2__.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", Object.assign({ className: "secondLine" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_lines_sliderLineComponent__WEBPACK_IMPORTED_MODULE_5__.SliderLineComponent, { margin: true, label: "x", minimum: 0, maximum: 360, step: 0.1, directValue: core_Misc_tools__WEBPACK_IMPORTED_MODULE_6__.Tools.ToDegrees(this.state.value.x), onChange: (value) => this.updateStateX(core_Misc_tools__WEBPACK_IMPORTED_MODULE_6__.Tools.ToRadians(value)) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_lines_sliderLineComponent__WEBPACK_IMPORTED_MODULE_5__.SliderLineComponent, { margin: true, label: "y", minimum: 0, maximum: 360, step: 0.1, directValue: core_Misc_tools__WEBPACK_IMPORTED_MODULE_6__.Tools.ToDegrees(this.state.value.y), onChange: (value) => this.updateStateY(core_Misc_tools__WEBPACK_IMPORTED_MODULE_6__.Tools.ToRadians(value)) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_lines_sliderLineComponent__WEBPACK_IMPORTED_MODULE_5__.SliderLineComponent, { margin: true, label: "z", minimum: 0, maximum: 360, step: 0.1, directValue: core_Misc_tools__WEBPACK_IMPORTED_MODULE_6__.Tools.ToDegrees(this.state.value.z), onChange: (value) => this.updateStateZ(core_Misc_tools__WEBPACK_IMPORTED_MODULE_6__.Tools.ToRadians(value)) })] }))), this.state.isExpanded && this.props.useEuler && this.props.noSlider && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ className: "secondLine" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_lines_numericInputComponent__WEBPACK_IMPORTED_MODULE_2__.NumericInputComponent, { lockObject: this.props.lockObject, label: "x", step: this.props.step, value: core_Misc_tools__WEBPACK_IMPORTED_MODULE_6__.Tools.ToDegrees(this.state.value.x), onChange: (value) => this.updateStateX(core_Misc_tools__WEBPACK_IMPORTED_MODULE_6__.Tools.ToRadians(value)) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_lines_numericInputComponent__WEBPACK_IMPORTED_MODULE_2__.NumericInputComponent, { lockObject: this.props.lockObject, label: "y", step: this.props.step, value: core_Misc_tools__WEBPACK_IMPORTED_MODULE_6__.Tools.ToDegrees(this.state.value.y), onChange: (value) => this.updateStateY(core_Misc_tools__WEBPACK_IMPORTED_MODULE_6__.Tools.ToRadians(value)) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_lines_numericInputComponent__WEBPACK_IMPORTED_MODULE_2__.NumericInputComponent, { lockObject: this.props.lockObject, label: "z", step: this.props.step, value: core_Misc_tools__WEBPACK_IMPORTED_MODULE_6__.Tools.ToDegrees(this.state.value.z), onChange: (value) => this.updateStateZ(core_Misc_tools__WEBPACK_IMPORTED_MODULE_6__.Tools.ToRadians(value)) })] })))] })));
|
|
63036
63115
|
}
|
|
63037
63116
|
}
|
|
63038
63117
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
@@ -63133,7 +63212,7 @@ class Vector4LineComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component
|
|
|
63133
63212
|
}
|
|
63134
63213
|
render() {
|
|
63135
63214
|
const chevron = this.state.isExpanded ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_fortawesome_react_fontawesome__WEBPACK_IMPORTED_MODULE_3__.FontAwesomeIcon, { icon: _fortawesome_free_solid_svg_icons__WEBPACK_IMPORTED_MODULE_4__.faMinus }) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_fortawesome_react_fontawesome__WEBPACK_IMPORTED_MODULE_3__.FontAwesomeIcon, { icon: _fortawesome_free_solid_svg_icons__WEBPACK_IMPORTED_MODULE_4__.faPlus });
|
|
63136
|
-
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ className: "vector3Line" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ 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", Object.assign({ className: "label", title: this.props.label }, { children: this.props.label })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "vector" }, { children: `X: ${this.state.value.x.toFixed(2)}, Y: ${this.state.value.y.toFixed(2)}, Z: ${this.state.value.z.toFixed(2)}, W: ${this.state.value.w.toFixed(2)}` })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "expand hoverIcon", onClick: () => this.switchExpandState(), title: "Expand" }, { children: chevron }))] })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ className: "secondLine" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_numericInputComponent__WEBPACK_IMPORTED_MODULE_2__.NumericInputComponent, { label: "x", step: this.props.step, value: this.state.value.x, onChange: (value) => this.updateStateX(value) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_numericInputComponent__WEBPACK_IMPORTED_MODULE_2__.NumericInputComponent, { label: "y", step: this.props.step, value: this.state.value.y, onChange: (value) => this.updateStateY(value) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_numericInputComponent__WEBPACK_IMPORTED_MODULE_2__.NumericInputComponent, { label: "z", step: this.props.step, value: this.state.value.z, onChange: (value) => this.updateStateZ(value) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_numericInputComponent__WEBPACK_IMPORTED_MODULE_2__.NumericInputComponent, { label: "w", step: this.props.step, value: this.state.value.w, onChange: (value) => this.updateStateW(value) })] }))] })));
|
|
63215
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ className: "vector3Line" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ 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", Object.assign({ className: "label", title: this.props.label }, { children: this.props.label })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "vector" }, { children: `X: ${this.state.value.x.toFixed(2)}, Y: ${this.state.value.y.toFixed(2)}, Z: ${this.state.value.z.toFixed(2)}, W: ${this.state.value.w.toFixed(2)}` })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "expand hoverIcon", onClick: () => this.switchExpandState(), title: "Expand" }, { children: chevron }))] })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ className: "secondLine" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_numericInputComponent__WEBPACK_IMPORTED_MODULE_2__.NumericInputComponent, { lockObject: this.props.lockObject, label: "x", step: this.props.step, value: this.state.value.x, onChange: (value) => this.updateStateX(value) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_numericInputComponent__WEBPACK_IMPORTED_MODULE_2__.NumericInputComponent, { lockObject: this.props.lockObject, label: "y", step: this.props.step, value: this.state.value.y, onChange: (value) => this.updateStateY(value) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_numericInputComponent__WEBPACK_IMPORTED_MODULE_2__.NumericInputComponent, { lockObject: this.props.lockObject, label: "z", step: this.props.step, value: this.state.value.z, onChange: (value) => this.updateStateZ(value) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_numericInputComponent__WEBPACK_IMPORTED_MODULE_2__.NumericInputComponent, { lockObject: this.props.lockObject, label: "w", step: this.props.step, value: this.state.value.w, onChange: (value) => this.updateStateW(value) })] }))] })));
|
|
63137
63216
|
}
|
|
63138
63217
|
}
|
|
63139
63218
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
@@ -63312,6 +63391,8 @@ class GraphCanvasComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component
|
|
|
63312
63391
|
this._oldY = -1;
|
|
63313
63392
|
this._frameIsMoving = false;
|
|
63314
63393
|
this._isLoading = false;
|
|
63394
|
+
this._copiedNodes = [];
|
|
63395
|
+
this._copiedFrames = [];
|
|
63315
63396
|
props.stateManager.onSelectionChangedObservable.add((options) => {
|
|
63316
63397
|
const { selection, forceKeepSelection, marqueeSelection = false } = options || {};
|
|
63317
63398
|
if (!selection) {
|
|
@@ -63504,6 +63585,183 @@ class GraphCanvasComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component
|
|
|
63504
63585
|
}
|
|
63505
63586
|
return false;
|
|
63506
63587
|
}
|
|
63588
|
+
handleKeyDown(evt, onRemove, mouseLocationX, mouseLocationY, dataGenerator, rootElement) {
|
|
63589
|
+
if ((evt.keyCode === 46 || evt.keyCode === 8) && !this.props.stateManager.lockObject.lock) {
|
|
63590
|
+
// Delete
|
|
63591
|
+
const selectedItems = this.selectedNodes;
|
|
63592
|
+
for (const selectedItem of selectedItems) {
|
|
63593
|
+
selectedItem.dispose();
|
|
63594
|
+
onRemove(selectedItem.content);
|
|
63595
|
+
this.removeDataFromCache(selectedItem.content.data);
|
|
63596
|
+
}
|
|
63597
|
+
if (this.selectedLink) {
|
|
63598
|
+
this.selectedLink.dispose();
|
|
63599
|
+
}
|
|
63600
|
+
if (this.selectedFrames.length) {
|
|
63601
|
+
for (const frame of this.selectedFrames) {
|
|
63602
|
+
if (frame.isCollapsed) {
|
|
63603
|
+
while (frame.nodes.length > 0) {
|
|
63604
|
+
onRemove(frame.nodes[0].content);
|
|
63605
|
+
this.removeDataFromCache(frame.nodes[0].content.data);
|
|
63606
|
+
frame.nodes[0].dispose();
|
|
63607
|
+
}
|
|
63608
|
+
frame.isCollapsed = false;
|
|
63609
|
+
}
|
|
63610
|
+
else {
|
|
63611
|
+
frame.nodes.forEach((node) => {
|
|
63612
|
+
node.enclosingFrameId = -1;
|
|
63613
|
+
});
|
|
63614
|
+
}
|
|
63615
|
+
frame.dispose();
|
|
63616
|
+
}
|
|
63617
|
+
}
|
|
63618
|
+
this.props.stateManager.onSelectionChangedObservable.notifyObservers(null);
|
|
63619
|
+
this.props.stateManager.onRebuildRequiredObservable.notifyObservers(false);
|
|
63620
|
+
return;
|
|
63621
|
+
}
|
|
63622
|
+
if (!evt.ctrlKey || this.props.stateManager.lockObject.lock) {
|
|
63623
|
+
return;
|
|
63624
|
+
}
|
|
63625
|
+
if (evt.key === "c" || evt.key === "C") {
|
|
63626
|
+
// Copy
|
|
63627
|
+
this._copiedNodes = [];
|
|
63628
|
+
this._copiedFrames = [];
|
|
63629
|
+
if (this.selectedFrames.length) {
|
|
63630
|
+
for (const frame of this.selectedFrames) {
|
|
63631
|
+
frame.serialize(true);
|
|
63632
|
+
this._copiedFrames.push(frame);
|
|
63633
|
+
}
|
|
63634
|
+
return;
|
|
63635
|
+
}
|
|
63636
|
+
const selectedItems = this.selectedNodes;
|
|
63637
|
+
if (!selectedItems.length) {
|
|
63638
|
+
return;
|
|
63639
|
+
}
|
|
63640
|
+
const selectedItem = selectedItems[0];
|
|
63641
|
+
if (!selectedItem.content.data) {
|
|
63642
|
+
return;
|
|
63643
|
+
}
|
|
63644
|
+
this._copiedNodes = selectedItems.slice(0);
|
|
63645
|
+
}
|
|
63646
|
+
else if (evt.key === "v" || evt.key === "V") {
|
|
63647
|
+
// Paste
|
|
63648
|
+
const zoomLevel = this.zoom;
|
|
63649
|
+
let currentY = (mouseLocationY - rootElement.offsetTop - this.y - 20) / zoomLevel;
|
|
63650
|
+
if (this._copiedFrames.length) {
|
|
63651
|
+
for (const frame of this._copiedFrames) {
|
|
63652
|
+
// New frame
|
|
63653
|
+
const newFrame = new _graphFrame__WEBPACK_IMPORTED_MODULE_7__.GraphFrame(null, this, true);
|
|
63654
|
+
this.frames.push(newFrame);
|
|
63655
|
+
newFrame.width = frame.width;
|
|
63656
|
+
newFrame.height = frame.height;
|
|
63657
|
+
newFrame.width / 2;
|
|
63658
|
+
newFrame.name = frame.name;
|
|
63659
|
+
newFrame.color = frame.color;
|
|
63660
|
+
let currentX = (mouseLocationX - rootElement.offsetLeft - this.x) / zoomLevel;
|
|
63661
|
+
newFrame.x = currentX - newFrame.width / 2;
|
|
63662
|
+
newFrame.y = currentY;
|
|
63663
|
+
// Paste nodes
|
|
63664
|
+
if (frame.nodes.length) {
|
|
63665
|
+
currentX = newFrame.x + frame.nodes[0].x - frame.x;
|
|
63666
|
+
currentY = newFrame.y + frame.nodes[0].y - frame.y;
|
|
63667
|
+
this._frameIsMoving = true;
|
|
63668
|
+
const newNodes = this.pasteSelection(frame.nodes, currentX, currentY, dataGenerator);
|
|
63669
|
+
if (newNodes) {
|
|
63670
|
+
for (const node of newNodes) {
|
|
63671
|
+
newFrame.syncNode(node);
|
|
63672
|
+
}
|
|
63673
|
+
}
|
|
63674
|
+
this._frameIsMoving = false;
|
|
63675
|
+
}
|
|
63676
|
+
newFrame.adjustPorts();
|
|
63677
|
+
if (frame.isCollapsed) {
|
|
63678
|
+
newFrame.isCollapsed = true;
|
|
63679
|
+
}
|
|
63680
|
+
// Select
|
|
63681
|
+
this.props.stateManager.onSelectionChangedObservable.notifyObservers({ selection: newFrame, forceKeepSelection: true });
|
|
63682
|
+
return;
|
|
63683
|
+
}
|
|
63684
|
+
}
|
|
63685
|
+
if (!this._copiedNodes.length) {
|
|
63686
|
+
return;
|
|
63687
|
+
}
|
|
63688
|
+
const currentX = (mouseLocationX - rootElement.offsetLeft - this.x - GraphCanvasComponent.NodeWidth) / zoomLevel;
|
|
63689
|
+
this.pasteSelection(this._copiedNodes, currentX, currentY, dataGenerator, true);
|
|
63690
|
+
}
|
|
63691
|
+
}
|
|
63692
|
+
pasteSelection(copiedNodes, currentX, currentY, dataGenerator, selectNew = false) {
|
|
63693
|
+
let originalNode = null;
|
|
63694
|
+
const newNodes = [];
|
|
63695
|
+
// Copy to prevent recursive side effects while creating nodes.
|
|
63696
|
+
copiedNodes = copiedNodes.slice();
|
|
63697
|
+
// Cancel selection
|
|
63698
|
+
this.props.stateManager.onSelectionChangedObservable.notifyObservers(null);
|
|
63699
|
+
// Create new nodes
|
|
63700
|
+
for (const node of copiedNodes) {
|
|
63701
|
+
const data = node.content.data;
|
|
63702
|
+
if (!data) {
|
|
63703
|
+
continue;
|
|
63704
|
+
}
|
|
63705
|
+
const newNode = dataGenerator(node.content);
|
|
63706
|
+
let x = 0;
|
|
63707
|
+
let y = 0;
|
|
63708
|
+
if (originalNode) {
|
|
63709
|
+
x = currentX + node.x - originalNode.x;
|
|
63710
|
+
y = currentY + node.y - originalNode.y;
|
|
63711
|
+
}
|
|
63712
|
+
else {
|
|
63713
|
+
originalNode = node;
|
|
63714
|
+
x = currentX;
|
|
63715
|
+
y = currentY;
|
|
63716
|
+
}
|
|
63717
|
+
newNode.x = x;
|
|
63718
|
+
newNode.y = y;
|
|
63719
|
+
newNode.cleanAccumulation();
|
|
63720
|
+
newNodes.push(newNode);
|
|
63721
|
+
if (selectNew) {
|
|
63722
|
+
this.props.stateManager.onSelectionChangedObservable.notifyObservers({ selection: newNode, forceKeepSelection: true });
|
|
63723
|
+
}
|
|
63724
|
+
}
|
|
63725
|
+
// Relink
|
|
63726
|
+
const done = new Array(newNodes.length);
|
|
63727
|
+
for (let index = 0; index < newNodes.length; index++) {
|
|
63728
|
+
this.reconnectNewNodes(index, newNodes, copiedNodes, done);
|
|
63729
|
+
}
|
|
63730
|
+
return newNodes;
|
|
63731
|
+
}
|
|
63732
|
+
reconnectNewNodes(nodeIndex, newNodes, sourceNodes, done) {
|
|
63733
|
+
if (done[nodeIndex]) {
|
|
63734
|
+
return;
|
|
63735
|
+
}
|
|
63736
|
+
const currentNode = newNodes[nodeIndex];
|
|
63737
|
+
const sourceNode = sourceNodes[nodeIndex];
|
|
63738
|
+
for (let inputIndex = 0; inputIndex < sourceNode.content.inputs.length; inputIndex++) {
|
|
63739
|
+
const sourceInput = sourceNode.content.inputs[inputIndex];
|
|
63740
|
+
const currentInput = currentNode.content.inputs[inputIndex];
|
|
63741
|
+
if (!sourceInput.isConnected) {
|
|
63742
|
+
continue;
|
|
63743
|
+
}
|
|
63744
|
+
const sourceContent = this.findNodeFromData(sourceInput.connectedPort.ownerData).content;
|
|
63745
|
+
const activeNodes = sourceNodes.filter((s) => s.content.data === sourceContent);
|
|
63746
|
+
if (activeNodes.length > 0) {
|
|
63747
|
+
const activeNode = activeNodes[0];
|
|
63748
|
+
const indexInList = sourceNodes.indexOf(activeNode);
|
|
63749
|
+
// First make sure to connect the other one
|
|
63750
|
+
this.reconnectNewNodes(indexInList, newNodes, sourceNodes, done);
|
|
63751
|
+
// Then reconnect
|
|
63752
|
+
const outputIndex = sourceContent.outputs.indexOf(sourceInput.connectedPort);
|
|
63753
|
+
const newOutput = newNodes[indexInList].content.data.outputs[outputIndex];
|
|
63754
|
+
newOutput.connectTo(currentInput);
|
|
63755
|
+
}
|
|
63756
|
+
else {
|
|
63757
|
+
// Connect with outside nodes
|
|
63758
|
+
sourceInput.connectedPort.connectTo(currentInput);
|
|
63759
|
+
}
|
|
63760
|
+
this.connectPorts(currentInput.connectedPort, currentInput);
|
|
63761
|
+
}
|
|
63762
|
+
currentNode.refresh();
|
|
63763
|
+
done[nodeIndex] = true;
|
|
63764
|
+
}
|
|
63507
63765
|
getCachedData() {
|
|
63508
63766
|
return this._nodeDataContentList;
|
|
63509
63767
|
}
|
|
@@ -63804,7 +64062,7 @@ class GraphCanvasComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component
|
|
|
63804
64062
|
onDown(evt) {
|
|
63805
64063
|
this._rootContainer.setPointerCapture(evt.pointerId);
|
|
63806
64064
|
// Selection?
|
|
63807
|
-
if (evt.currentTarget === this._hostCanvas &&
|
|
64065
|
+
if (evt.currentTarget === this._hostCanvas && this._multiKeyIsPressed) {
|
|
63808
64066
|
this._selectionBox = this.props.stateManager.hostDocument.createElement("div");
|
|
63809
64067
|
this._selectionBox.classList.add("selection-box");
|
|
63810
64068
|
this._selectionContainer.appendChild(this._selectionBox);
|
|
@@ -63959,7 +64217,7 @@ class GraphCanvasComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component
|
|
|
63959
64217
|
if (pointB.direction === _interfaces_portData__WEBPACK_IMPORTED_MODULE_9__.PortDataDirection.Output) {
|
|
63960
64218
|
return;
|
|
63961
64219
|
}
|
|
63962
|
-
// No destination so let's spin a new input
|
|
64220
|
+
// No destination so let's spin a new input node
|
|
63963
64221
|
const newDefaultInput = this.props.stateManager.createDefaultInputData(this.props.stateManager.data, this._candidateLink.portA.portData, this);
|
|
63964
64222
|
const pointName = newDefaultInput.name;
|
|
63965
64223
|
const emittedNodeData = newDefaultInput.data;
|
|
@@ -63978,7 +64236,7 @@ class GraphCanvasComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component
|
|
|
63978
64236
|
if (portData.connectedPort) {
|
|
63979
64237
|
const existingNodes = this.nodes.filter((n) => {
|
|
63980
64238
|
var _a;
|
|
63981
|
-
return n.content === ((_a = portData.connectedPort) === null || _a === void 0 ? void 0 : _a.ownerData);
|
|
64239
|
+
return n.content.data === ((_a = portData.connectedPort) === null || _a === void 0 ? void 0 : _a.ownerData);
|
|
63982
64240
|
});
|
|
63983
64241
|
const connectedNode = existingNodes[0];
|
|
63984
64242
|
if (connectedNode.x === 0 && connectedNode.y === 0) {
|
|
@@ -64029,7 +64287,7 @@ class GraphCanvasComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component
|
|
|
64029
64287
|
});
|
|
64030
64288
|
}
|
|
64031
64289
|
if (pointB.ownerData.inputsAreExclusive) {
|
|
64032
|
-
// Disconnect all inputs if
|
|
64290
|
+
// Disconnect all inputs if node has exclusive inputs
|
|
64033
64291
|
pointB.ownerData.inputs.forEach((i) => {
|
|
64034
64292
|
const links = nodeB.getLinksForPortData(i);
|
|
64035
64293
|
if (!linksToNotifyForDispose) {
|
|
@@ -64053,12 +64311,38 @@ class GraphCanvasComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component
|
|
|
64053
64311
|
connectNodes(nodeA, pointA, nodeB, pointB) {
|
|
64054
64312
|
pointA.connectTo(pointB);
|
|
64055
64313
|
this.connectPorts(pointA, pointB);
|
|
64056
|
-
// Need to potentially propagate the type of pointA to other ports of
|
|
64314
|
+
// Need to potentially propagate the type of pointA to other ports of nodes connected to owner of pointB
|
|
64057
64315
|
// We also need to check if we want to display the promotion warning
|
|
64058
64316
|
const visitedNodes = new Set([nodeA]);
|
|
64059
64317
|
const visitedLinks = new Set([nodeB.links[nodeB.links.length - 1]]);
|
|
64060
64318
|
(0,_tools__WEBPACK_IMPORTED_MODULE_12__.RefreshNode)(nodeB, visitedNodes, visitedLinks);
|
|
64061
64319
|
}
|
|
64320
|
+
drop(newNode, targetX, targetY, offsetX, offsetY) {
|
|
64321
|
+
let x = targetX - this.x - offsetX * this.zoom;
|
|
64322
|
+
let y = targetY - this.y - offsetY * this.zoom;
|
|
64323
|
+
newNode.x = x / this.zoom;
|
|
64324
|
+
newNode.y = y / this.zoom;
|
|
64325
|
+
newNode.cleanAccumulation();
|
|
64326
|
+
this.props.stateManager.onNewNodeCreatedObservable.notifyObservers(newNode);
|
|
64327
|
+
this.props.stateManager.onSelectionChangedObservable.notifyObservers(null);
|
|
64328
|
+
this.props.stateManager.onSelectionChangedObservable.notifyObservers({ selection: newNode });
|
|
64329
|
+
x -= GraphCanvasComponent.NodeWidth + 150;
|
|
64330
|
+
newNode.content.inputs.forEach((portData) => {
|
|
64331
|
+
if (portData.connectedPort) {
|
|
64332
|
+
const existingNodes = this.nodes.filter((n) => {
|
|
64333
|
+
var _a;
|
|
64334
|
+
return n.content.data === ((_a = portData.connectedPort) === null || _a === void 0 ? void 0 : _a.ownerData);
|
|
64335
|
+
});
|
|
64336
|
+
const connectedNode = existingNodes[0];
|
|
64337
|
+
if (connectedNode.x === 0 && connectedNode.y === 0) {
|
|
64338
|
+
connectedNode.x = x / this.zoom;
|
|
64339
|
+
connectedNode.y = y / this.zoom;
|
|
64340
|
+
connectedNode.cleanAccumulation();
|
|
64341
|
+
y += 80;
|
|
64342
|
+
}
|
|
64343
|
+
}
|
|
64344
|
+
});
|
|
64345
|
+
}
|
|
64062
64346
|
processEditorData(editorData) {
|
|
64063
64347
|
const frames = this._frames.splice(0);
|
|
64064
64348
|
for (const frame of frames) {
|
|
@@ -64084,8 +64368,8 @@ class GraphCanvasComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component
|
|
|
64084
64368
|
// Locations
|
|
64085
64369
|
for (const location of editorData.locations) {
|
|
64086
64370
|
for (const node of this.nodes) {
|
|
64087
|
-
const
|
|
64088
|
-
if (
|
|
64371
|
+
const data = node.content.data;
|
|
64372
|
+
if (data && data.uniqueId === location.blockId) {
|
|
64089
64373
|
node.x = location.x;
|
|
64090
64374
|
node.y = location.y;
|
|
64091
64375
|
node.cleanAccumulation();
|
|
@@ -64111,6 +64395,7 @@ class GraphCanvasComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component
|
|
|
64111
64395
|
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ id: "graph-canvas", onWheel: (evt) => this.onWheel(evt), onPointerMove: (evt) => this.onMove(evt), onPointerDown: (evt) => this.onDown(evt), onPointerUp: (evt) => this.onUp(evt) }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ id: "graph-container" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { id: "graph-canvas-container" }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { id: "frame-container" }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("svg", { id: "graph-svg-container" }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { id: "selection-container" })] })) })));
|
|
64112
64396
|
}
|
|
64113
64397
|
}
|
|
64398
|
+
GraphCanvasComponent.NodeWidth = 100;
|
|
64114
64399
|
|
|
64115
64400
|
|
|
64116
64401
|
/***/ }),
|
|
@@ -64130,9 +64415,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
64130
64415
|
/* harmony import */ var core_Misc_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core/Maths/math.color */ "core/Misc/dataStorage");
|
|
64131
64416
|
/* harmony import */ var core_Misc_observable__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_Misc_observable__WEBPACK_IMPORTED_MODULE_0__);
|
|
64132
64417
|
/* 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
|
-
|
|
64418
|
+
/* harmony import */ var _stringTools__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../stringTools */ "../../../dev/sharedUiComponents/dist/stringTools.js");
|
|
64136
64419
|
|
|
64137
64420
|
|
|
64138
64421
|
|
|
@@ -64719,7 +65002,7 @@ class GraphFrame {
|
|
|
64719
65002
|
return this._isCollapsed;
|
|
64720
65003
|
}
|
|
64721
65004
|
_createInputPort(port, node) {
|
|
64722
|
-
const localPort = _frameNodePort__WEBPACK_IMPORTED_MODULE_1__.FrameNodePort.CreateFrameNodePortElement(
|
|
65005
|
+
const localPort = _frameNodePort__WEBPACK_IMPORTED_MODULE_1__.FrameNodePort.CreateFrameNodePortElement(port.portData, node, this._inputPortContainer, null, this._ownerCanvas.stateManager, true, GraphFrame._FramePortCounter++, this.id);
|
|
64723
65006
|
this._frameInPorts.push(localPort);
|
|
64724
65007
|
port.delegatedPort = localPort;
|
|
64725
65008
|
this._controlledPorts.push(port);
|
|
@@ -64889,7 +65172,7 @@ class GraphFrame {
|
|
|
64889
65172
|
let localPort;
|
|
64890
65173
|
if (!portAdded) {
|
|
64891
65174
|
portAdded = true;
|
|
64892
|
-
localPort = _frameNodePort__WEBPACK_IMPORTED_MODULE_1__.FrameNodePort.CreateFrameNodePortElement(
|
|
65175
|
+
localPort = _frameNodePort__WEBPACK_IMPORTED_MODULE_1__.FrameNodePort.CreateFrameNodePortElement(port.portData, link.nodeA, this._outputPortContainer, null, this._ownerCanvas.stateManager, false, GraphFrame._FramePortCounter++, this.id);
|
|
64893
65176
|
this._frameOutPorts.push(localPort);
|
|
64894
65177
|
link.isVisible = true;
|
|
64895
65178
|
const onLinkDisposedObserver = link.onDisposedObservable.add((nodeLink) => {
|
|
@@ -64910,7 +65193,7 @@ class GraphFrame {
|
|
|
64910
65193
|
this._controlledPorts.push(port);
|
|
64911
65194
|
}
|
|
64912
65195
|
else if (port.exposedPortPosition >= 0 && !portAdded) {
|
|
64913
|
-
const localPort = _frameNodePort__WEBPACK_IMPORTED_MODULE_1__.FrameNodePort.CreateFrameNodePortElement(
|
|
65196
|
+
const localPort = _frameNodePort__WEBPACK_IMPORTED_MODULE_1__.FrameNodePort.CreateFrameNodePortElement(port.portData, node, this._outputPortContainer, null, this._ownerCanvas.stateManager, false, GraphFrame._FramePortCounter++, this.id);
|
|
64914
65197
|
this._frameOutPorts.push(localPort);
|
|
64915
65198
|
port.delegatedPort = localPort;
|
|
64916
65199
|
this._controlledPorts.push(port);
|
|
@@ -64921,7 +65204,7 @@ class GraphFrame {
|
|
|
64921
65204
|
return true;
|
|
64922
65205
|
}
|
|
64923
65206
|
else if (port.exposedOnFrame) {
|
|
64924
|
-
const localPort = _frameNodePort__WEBPACK_IMPORTED_MODULE_1__.FrameNodePort.CreateFrameNodePortElement(
|
|
65207
|
+
const localPort = _frameNodePort__WEBPACK_IMPORTED_MODULE_1__.FrameNodePort.CreateFrameNodePortElement(port.portData, node, this._outputPortContainer, null, this._ownerCanvas.stateManager, false, GraphFrame._FramePortCounter++, this.id);
|
|
64925
65208
|
this._frameOutPorts.push(localPort);
|
|
64926
65209
|
port.delegatedPort = localPort;
|
|
64927
65210
|
this._controlledPorts.push(port);
|
|
@@ -65388,7 +65671,7 @@ class GraphFrame {
|
|
|
65388
65671
|
export() {
|
|
65389
65672
|
const state = this._ownerCanvas.stateManager;
|
|
65390
65673
|
const json = state.exportData(state.data);
|
|
65391
|
-
|
|
65674
|
+
_stringTools__WEBPACK_IMPORTED_MODULE_2__.StringTools.DownloadAsFile(state.hostDocument, json, this._name + ".json");
|
|
65392
65675
|
}
|
|
65393
65676
|
adjustPorts() {
|
|
65394
65677
|
for (const node of this.nodes) {
|
|
@@ -65645,13 +65928,13 @@ class GraphNode {
|
|
|
65645
65928
|
getPortForPortData(portData) {
|
|
65646
65929
|
for (const port of this._inputPorts) {
|
|
65647
65930
|
const attachedPoint = port.portData;
|
|
65648
|
-
if (attachedPoint === portData) {
|
|
65931
|
+
if (attachedPoint === portData || (attachedPoint.ownerData === portData.ownerData && attachedPoint.internalName === portData.internalName)) {
|
|
65649
65932
|
return port;
|
|
65650
65933
|
}
|
|
65651
65934
|
}
|
|
65652
65935
|
for (const port of this._outputPorts) {
|
|
65653
65936
|
const attachedPoint = port.portData;
|
|
65654
|
-
if (attachedPoint === portData) {
|
|
65937
|
+
if (attachedPoint === portData || (attachedPoint.ownerData === portData.ownerData && attachedPoint.internalName === portData.internalName)) {
|
|
65655
65938
|
return port;
|
|
65656
65939
|
}
|
|
65657
65940
|
}
|
|
@@ -66018,7 +66301,7 @@ class NodeLink {
|
|
|
66018
66301
|
const pointA = this._portA.portData;
|
|
66019
66302
|
const nodeB = this._nodeB;
|
|
66020
66303
|
const pointB = this._portB.portData;
|
|
66021
|
-
if (stateManager.isElbowConnectionAllowed(this._portA, this._portB)) {
|
|
66304
|
+
if (!stateManager.isElbowConnectionAllowed(this._portA, this._portB)) {
|
|
66022
66305
|
return;
|
|
66023
66306
|
}
|
|
66024
66307
|
// Create an elbow at the clicked location
|
|
@@ -66027,8 +66310,8 @@ class NodeLink {
|
|
|
66027
66310
|
// Delete previous link
|
|
66028
66311
|
this.dispose();
|
|
66029
66312
|
// Connect to Elbow block
|
|
66030
|
-
this._graphCanvas.connectNodes(nodeA, pointA, newNode, newElbowBlock.input);
|
|
66031
|
-
this._graphCanvas.connectNodes(newNode, newElbowBlock.output, nodeB, pointB);
|
|
66313
|
+
this._graphCanvas.connectNodes(nodeA, pointA, newNode, newNode.getPortDataForPortDataContent(newElbowBlock.input));
|
|
66314
|
+
this._graphCanvas.connectNodes(newNode, newNode.getPortDataForPortDataContent(newElbowBlock.output), nodeB, pointB);
|
|
66032
66315
|
stateManager.onRebuildRequiredObservable.notifyObservers(true);
|
|
66033
66316
|
});
|
|
66034
66317
|
stateManager.onNewBlockRequiredObservable.notifyObservers({
|
|
@@ -68423,16 +68706,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
68423
68706
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "../../../../node_modules/react/index.js");
|
|
68424
68707
|
/* harmony import */ var _sharedComponents_lineContainerComponent__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../sharedComponents/lineContainerComponent */ "../../../tools/nodeEditor/dist/sharedComponents/lineContainerComponent.js");
|
|
68425
68708
|
/* harmony import */ var _sharedComponents_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../sharedComponents/checkBoxLineComponent */ "../../../tools/nodeEditor/dist/sharedComponents/checkBoxLineComponent.js");
|
|
68426
|
-
/* harmony import */ var
|
|
68427
|
-
/* harmony import */ var
|
|
68428
|
-
/* harmony import */ var
|
|
68429
|
-
/* harmony import */ var
|
|
68430
|
-
/* harmony import */ var
|
|
68431
|
-
/* harmony import */ var
|
|
68432
|
-
/* harmony import */ var
|
|
68433
|
-
/* harmony import */ var
|
|
68434
|
-
/* harmony import */ var
|
|
68435
|
-
/* harmony import */ var
|
|
68709
|
+
/* harmony import */ var core_Materials_Node_Enums_nodeMaterialBlockConnectionPointTypes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core/Materials/Node/Enums/nodeMaterialBlockConnectionPointTypes */ "core/Misc/dataStorage");
|
|
68710
|
+
/* harmony import */ var core_Materials_Node_Enums_nodeMaterialBlockConnectionPointTypes__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_Materials_Node_Enums_nodeMaterialBlockConnectionPointTypes__WEBPACK_IMPORTED_MODULE_4__);
|
|
68711
|
+
/* harmony import */ var _propertyTab_scss__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./propertyTab.scss */ "../../../tools/nodeEditor/dist/components/propertyTab/propertyTab.scss");
|
|
68712
|
+
/* harmony import */ var shared_ui_components_lines_vector2LineComponent__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! shared-ui-components/lines/vector2LineComponent */ "../../../dev/sharedUiComponents/dist/lines/vector2LineComponent.js");
|
|
68713
|
+
/* harmony import */ var shared_ui_components_lines_vector3LineComponent__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! shared-ui-components/lines/vector3LineComponent */ "../../../dev/sharedUiComponents/dist/lines/vector3LineComponent.js");
|
|
68714
|
+
/* harmony import */ var shared_ui_components_lines_vector4LineComponent__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! shared-ui-components/lines/vector4LineComponent */ "../../../dev/sharedUiComponents/dist/lines/vector4LineComponent.js");
|
|
68715
|
+
/* harmony import */ var shared_ui_components_lines_color3LineComponent__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! shared-ui-components/lines/color3LineComponent */ "../../../dev/sharedUiComponents/dist/lines/color3LineComponent.js");
|
|
68716
|
+
/* harmony import */ var shared_ui_components_lines_color4LineComponent__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! shared-ui-components/lines/color4LineComponent */ "../../../dev/sharedUiComponents/dist/lines/color4LineComponent.js");
|
|
68717
|
+
/* harmony import */ var shared_ui_components_lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! shared-ui-components/lines/floatLineComponent */ "../../../dev/sharedUiComponents/dist/lines/floatLineComponent.js");
|
|
68718
|
+
/* harmony import */ var shared_ui_components_lines_sliderLineComponent__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! shared-ui-components/lines/sliderLineComponent */ "../../../dev/sharedUiComponents/dist/lines/sliderLineComponent.js");
|
|
68436
68719
|
|
|
68437
68720
|
|
|
68438
68721
|
|
|
@@ -68458,22 +68741,22 @@ class InputsPropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Comp
|
|
|
68458
68741
|
}
|
|
68459
68742
|
renderInputBlock(block) {
|
|
68460
68743
|
switch (block.type) {
|
|
68461
|
-
case
|
|
68744
|
+
case core_Materials_Node_Enums_nodeMaterialBlockConnectionPointTypes__WEBPACK_IMPORTED_MODULE_4__.NodeMaterialBlockConnectionPointTypes.Float: {
|
|
68462
68745
|
const cantDisplaySlider = isNaN(block.min) || isNaN(block.max) || block.min === block.max;
|
|
68463
68746
|
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [block.isBoolean && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_sharedComponents_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_3__.CheckBoxLineComponent, { label: block.name, target: block, propertyName: "value", onValueChanged: () => {
|
|
68464
68747
|
this.processInputBlockUpdate(block);
|
|
68465
|
-
} }, block.uniqueId)), !block.isBoolean && cantDisplaySlider && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
68748
|
+
} }, block.uniqueId)), !block.isBoolean && cantDisplaySlider && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_11__.FloatLineComponent, { label: block.name, target: block, propertyName: "value", onChange: () => this.processInputBlockUpdate(block) }, block.uniqueId)), !block.isBoolean && !cantDisplaySlider && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_sliderLineComponent__WEBPACK_IMPORTED_MODULE_12__.SliderLineComponent, { label: block.name, target: block, propertyName: "value", step: (block.max - block.min) / 100.0, minimum: block.min, maximum: block.max, onChange: () => this.processInputBlockUpdate(block) }, block.uniqueId))] }, block.uniqueId));
|
|
68466
68749
|
}
|
|
68467
|
-
case
|
|
68468
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
68469
|
-
case
|
|
68470
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
68471
|
-
case
|
|
68472
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
68473
|
-
case
|
|
68474
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
68475
|
-
case
|
|
68476
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
68750
|
+
case core_Materials_Node_Enums_nodeMaterialBlockConnectionPointTypes__WEBPACK_IMPORTED_MODULE_4__.NodeMaterialBlockConnectionPointTypes.Color3:
|
|
68751
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_color3LineComponent__WEBPACK_IMPORTED_MODULE_9__.Color3LineComponent, { lockObject: this.props.lockObject, label: block.name, target: block, propertyName: "value", onChange: () => this.processInputBlockUpdate(block) }, block.uniqueId));
|
|
68752
|
+
case core_Materials_Node_Enums_nodeMaterialBlockConnectionPointTypes__WEBPACK_IMPORTED_MODULE_4__.NodeMaterialBlockConnectionPointTypes.Color4:
|
|
68753
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_color4LineComponent__WEBPACK_IMPORTED_MODULE_10__.Color4LineComponent, { lockObject: this.props.lockObject, label: block.name, target: block, propertyName: "value", onChange: () => this.processInputBlockUpdate(block) }, block.uniqueId));
|
|
68754
|
+
case core_Materials_Node_Enums_nodeMaterialBlockConnectionPointTypes__WEBPACK_IMPORTED_MODULE_4__.NodeMaterialBlockConnectionPointTypes.Vector2:
|
|
68755
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_vector2LineComponent__WEBPACK_IMPORTED_MODULE_6__.Vector2LineComponent, { lockObject: this.props.lockObject, label: block.name, target: block, propertyName: "value", onChange: () => this.processInputBlockUpdate(block) }, block.uniqueId));
|
|
68756
|
+
case core_Materials_Node_Enums_nodeMaterialBlockConnectionPointTypes__WEBPACK_IMPORTED_MODULE_4__.NodeMaterialBlockConnectionPointTypes.Vector3:
|
|
68757
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_vector3LineComponent__WEBPACK_IMPORTED_MODULE_7__.Vector3LineComponent, { lockObject: this.props.lockObject, label: block.name, target: block, propertyName: "value", onChange: () => this.processInputBlockUpdate(block) }, block.uniqueId));
|
|
68758
|
+
case core_Materials_Node_Enums_nodeMaterialBlockConnectionPointTypes__WEBPACK_IMPORTED_MODULE_4__.NodeMaterialBlockConnectionPointTypes.Vector4:
|
|
68759
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_vector4LineComponent__WEBPACK_IMPORTED_MODULE_8__.Vector4LineComponent, { lockObject: this.props.lockObject, label: block.name, target: block, propertyName: "value", onChange: () => this.processInputBlockUpdate(block) }, block.uniqueId));
|
|
68477
68760
|
}
|
|
68478
68761
|
return null;
|
|
68479
68762
|
}
|
|
@@ -68509,7 +68792,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
68509
68792
|
|
|
68510
68793
|
class Color3PropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
|
|
68511
68794
|
render() {
|
|
68512
|
-
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_color3LineComponent__WEBPACK_IMPORTED_MODULE_2__.Color3LineComponent, { label: "Value", target: this.props.inputBlock, propertyName: "value", onChange: () => {
|
|
68795
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_color3LineComponent__WEBPACK_IMPORTED_MODULE_2__.Color3LineComponent, { lockObject: this.props.lockObject, label: "Value", target: this.props.inputBlock, propertyName: "value", onChange: () => {
|
|
68513
68796
|
this.props.globalState.stateManager.onUpdateRequiredObservable.notifyObservers(this.props.inputBlock);
|
|
68514
68797
|
} }));
|
|
68515
68798
|
}
|
|
@@ -68537,7 +68820,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
68537
68820
|
|
|
68538
68821
|
class Color4PropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
|
|
68539
68822
|
render() {
|
|
68540
|
-
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_color4LineComponent__WEBPACK_IMPORTED_MODULE_2__.Color4LineComponent, { label: "Value", target: this.props.inputBlock, propertyName: "value", onChange: () => {
|
|
68823
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_color4LineComponent__WEBPACK_IMPORTED_MODULE_2__.Color4LineComponent, { lockObject: this.props.lockObject, label: "Value", target: this.props.inputBlock, propertyName: "value", onChange: () => {
|
|
68541
68824
|
this.props.globalState.stateManager.onUpdateRequiredObservable.notifyObservers(this.props.inputBlock);
|
|
68542
68825
|
} }));
|
|
68543
68826
|
}
|
|
@@ -68559,13 +68842,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
68559
68842
|
/* harmony export */ });
|
|
68560
68843
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "../../../../node_modules/react/jsx-runtime.js");
|
|
68561
68844
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "../../../../node_modules/react/index.js");
|
|
68562
|
-
/* harmony import */ var
|
|
68845
|
+
/* harmony import */ var shared_ui_components_lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! shared-ui-components/lines/floatLineComponent */ "../../../dev/sharedUiComponents/dist/lines/floatLineComponent.js");
|
|
68563
68846
|
|
|
68564
68847
|
|
|
68565
68848
|
|
|
68566
68849
|
class FloatPropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
|
|
68567
68850
|
render() {
|
|
68568
|
-
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
68851
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_2__.FloatLineComponent, { label: "Value", target: this.props.inputBlock, propertyName: "value", onChange: () => {
|
|
68569
68852
|
if (this.props.inputBlock.isConstant) {
|
|
68570
68853
|
this.props.globalState.stateManager.onRebuildRequiredObservable.notifyObservers(true);
|
|
68571
68854
|
}
|
|
@@ -68596,7 +68879,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
68596
68879
|
|
|
68597
68880
|
class MatrixPropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
|
|
68598
68881
|
render() {
|
|
68599
|
-
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_matrixLineComponent__WEBPACK_IMPORTED_MODULE_2__.MatrixLineComponent, { label: "Value", target: this.props.inputBlock, propertyName: "value", onChange: () => {
|
|
68882
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_matrixLineComponent__WEBPACK_IMPORTED_MODULE_2__.MatrixLineComponent, { lockObject: this.props.lockObject, label: "Value", target: this.props.inputBlock, propertyName: "value", onChange: () => {
|
|
68600
68883
|
this.props.globalState.stateManager.onUpdateRequiredObservable.notifyObservers(this.props.inputBlock);
|
|
68601
68884
|
}, mode: this.props.inputBlock.matrixMode, onModeChange: (mode) => {
|
|
68602
68885
|
this.props.inputBlock.matrixMode = mode;
|
|
@@ -68626,7 +68909,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
68626
68909
|
|
|
68627
68910
|
class Vector2PropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
|
|
68628
68911
|
render() {
|
|
68629
|
-
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_vector2LineComponent__WEBPACK_IMPORTED_MODULE_2__.Vector2LineComponent, { label: "Value", target: this.props.inputBlock, propertyName: "value", onChange: () => {
|
|
68912
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_vector2LineComponent__WEBPACK_IMPORTED_MODULE_2__.Vector2LineComponent, { lockObject: this.props.lockObject, label: "Value", target: this.props.inputBlock, propertyName: "value", onChange: () => {
|
|
68630
68913
|
this.props.globalState.stateManager.onUpdateRequiredObservable.notifyObservers(this.props.inputBlock);
|
|
68631
68914
|
} }));
|
|
68632
68915
|
}
|
|
@@ -68654,7 +68937,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
68654
68937
|
|
|
68655
68938
|
class Vector3PropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
|
|
68656
68939
|
render() {
|
|
68657
|
-
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_vector3LineComponent__WEBPACK_IMPORTED_MODULE_2__.Vector3LineComponent, { label: "Value", target: this.props.inputBlock, propertyName: "value", onChange: () => {
|
|
68940
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_vector3LineComponent__WEBPACK_IMPORTED_MODULE_2__.Vector3LineComponent, { lockObject: this.props.lockObject, label: "Value", target: this.props.inputBlock, propertyName: "value", onChange: () => {
|
|
68658
68941
|
this.props.globalState.stateManager.onUpdateRequiredObservable.notifyObservers(this.props.inputBlock);
|
|
68659
68942
|
} }));
|
|
68660
68943
|
}
|
|
@@ -68682,7 +68965,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
68682
68965
|
|
|
68683
68966
|
class Vector4PropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
|
|
68684
68967
|
render() {
|
|
68685
|
-
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_vector4LineComponent__WEBPACK_IMPORTED_MODULE_2__.Vector4LineComponent, { label: "Value", target: this.props.inputBlock, propertyName: "value", onChange: () => {
|
|
68968
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_vector4LineComponent__WEBPACK_IMPORTED_MODULE_2__.Vector4LineComponent, { lockObject: this.props.lockObject, label: "Value", target: this.props.inputBlock, propertyName: "value", onChange: () => {
|
|
68686
68969
|
this.props.globalState.stateManager.onUpdateRequiredObservable.notifyObservers(this.props.inputBlock);
|
|
68687
68970
|
} }));
|
|
68688
68971
|
}
|
|
@@ -68711,28 +68994,28 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
68711
68994
|
/* harmony import */ var core_Misc_tools__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_Misc_tools__WEBPACK_IMPORTED_MODULE_5__);
|
|
68712
68995
|
/* harmony import */ var _serializationTools__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../serializationTools */ "../../../tools/nodeEditor/dist/serializationTools.js");
|
|
68713
68996
|
/* harmony import */ var _sharedComponents_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../sharedComponents/checkBoxLineComponent */ "../../../tools/nodeEditor/dist/sharedComponents/checkBoxLineComponent.js");
|
|
68714
|
-
/* harmony import */ var
|
|
68715
|
-
/* harmony import */ var
|
|
68716
|
-
/* harmony import */ var
|
|
68717
|
-
/* harmony import */ var
|
|
68718
|
-
/* harmony import */ var
|
|
68719
|
-
/* harmony import */ var
|
|
68720
|
-
/* harmony import */ var
|
|
68721
|
-
/* harmony import */ var
|
|
68722
|
-
/* harmony import */ var
|
|
68723
|
-
/* harmony import */ var
|
|
68724
|
-
/* harmony import */ var
|
|
68725
|
-
/* harmony import */ var
|
|
68726
|
-
/* harmony import */ var
|
|
68727
|
-
/* harmony import */ var
|
|
68728
|
-
/* harmony import */ var
|
|
68729
|
-
/* harmony import */ var
|
|
68730
|
-
/* harmony import */ var
|
|
68731
|
-
/* harmony import */ var
|
|
68732
|
-
/* harmony import */ var
|
|
68733
|
-
/* harmony import */ var
|
|
68734
|
-
/* harmony import */ var
|
|
68735
|
-
/* harmony import */ var
|
|
68997
|
+
/* harmony import */ var _graphSystem_properties_framePropertyComponent__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../graphSystem/properties/framePropertyComponent */ "../../../tools/nodeEditor/dist/graphSystem/properties/framePropertyComponent.js");
|
|
68998
|
+
/* harmony import */ var _graphSystem_properties_frameNodePortPropertyComponent__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../graphSystem/properties/frameNodePortPropertyComponent */ "../../../tools/nodeEditor/dist/graphSystem/properties/frameNodePortPropertyComponent.js");
|
|
68999
|
+
/* harmony import */ var _graphSystem_properties_nodePortPropertyComponent__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../graphSystem/properties/nodePortPropertyComponent */ "../../../tools/nodeEditor/dist/graphSystem/properties/nodePortPropertyComponent.js");
|
|
69000
|
+
/* harmony import */ var _preview_previewType__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../preview/previewType */ "../../../tools/nodeEditor/dist/components/preview/previewType.js");
|
|
69001
|
+
/* harmony import */ var _inputsPropertyTabComponent__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./inputsPropertyTabComponent */ "../../../tools/nodeEditor/dist/components/propertyTab/inputsPropertyTabComponent.js");
|
|
69002
|
+
/* harmony import */ var _log_logComponent__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../log/logComponent */ "../../../tools/nodeEditor/dist/components/log/logComponent.js");
|
|
69003
|
+
/* harmony import */ var _propertyTab_scss__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./propertyTab.scss */ "../../../tools/nodeEditor/dist/components/propertyTab/propertyTab.scss");
|
|
69004
|
+
/* harmony import */ var shared_ui_components_nodeGraphSystem_graphNode__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! shared-ui-components/nodeGraphSystem/graphNode */ "../../../dev/sharedUiComponents/dist/nodeGraphSystem/graphNode.js");
|
|
69005
|
+
/* harmony import */ var shared_ui_components_nodeGraphSystem_graphFrame__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! shared-ui-components/nodeGraphSystem/graphFrame */ "../../../dev/sharedUiComponents/dist/nodeGraphSystem/graphFrame.js");
|
|
69006
|
+
/* harmony import */ var shared_ui_components_nodeGraphSystem_nodePort__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! shared-ui-components/nodeGraphSystem/nodePort */ "../../../dev/sharedUiComponents/dist/nodeGraphSystem/nodePort.js");
|
|
69007
|
+
/* harmony import */ var shared_ui_components_nodeGraphSystem_tools__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! shared-ui-components/nodeGraphSystem/tools */ "../../../dev/sharedUiComponents/dist/nodeGraphSystem/tools.js");
|
|
69008
|
+
/* harmony import */ var shared_ui_components_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! shared-ui-components/lines/textInputLineComponent */ "../../../dev/sharedUiComponents/dist/lines/textInputLineComponent.js");
|
|
69009
|
+
/* harmony import */ var shared_ui_components_lines_vector2LineComponent__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! shared-ui-components/lines/vector2LineComponent */ "../../../dev/sharedUiComponents/dist/lines/vector2LineComponent.js");
|
|
69010
|
+
/* harmony import */ var shared_ui_components_lines_vector3LineComponent__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! shared-ui-components/lines/vector3LineComponent */ "../../../dev/sharedUiComponents/dist/lines/vector3LineComponent.js");
|
|
69011
|
+
/* harmony import */ var shared_ui_components_lines_vector4LineComponent__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! shared-ui-components/lines/vector4LineComponent */ "../../../dev/sharedUiComponents/dist/lines/vector4LineComponent.js");
|
|
69012
|
+
/* harmony import */ var shared_ui_components_lines_color3LineComponent__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! shared-ui-components/lines/color3LineComponent */ "../../../dev/sharedUiComponents/dist/lines/color3LineComponent.js");
|
|
69013
|
+
/* harmony import */ var shared_ui_components_lines_color4LineComponent__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! shared-ui-components/lines/color4LineComponent */ "../../../dev/sharedUiComponents/dist/lines/color4LineComponent.js");
|
|
69014
|
+
/* harmony import */ var shared_ui_components_lines_buttonLineComponent__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! shared-ui-components/lines/buttonLineComponent */ "../../../dev/sharedUiComponents/dist/lines/buttonLineComponent.js");
|
|
69015
|
+
/* harmony import */ var shared_ui_components_lines_optionsLineComponent__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! shared-ui-components/lines/optionsLineComponent */ "../../../dev/sharedUiComponents/dist/lines/optionsLineComponent.js");
|
|
69016
|
+
/* harmony import */ var shared_ui_components_lines_textLineComponent__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! shared-ui-components/lines/textLineComponent */ "../../../dev/sharedUiComponents/dist/lines/textLineComponent.js");
|
|
69017
|
+
/* harmony import */ var shared_ui_components_lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! shared-ui-components/lines/floatLineComponent */ "../../../dev/sharedUiComponents/dist/lines/floatLineComponent.js");
|
|
69018
|
+
/* harmony import */ var shared_ui_components_lines_sliderLineComponent__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! shared-ui-components/lines/sliderLineComponent */ "../../../dev/sharedUiComponents/dist/lines/sliderLineComponent.js");
|
|
68736
69019
|
|
|
68737
69020
|
|
|
68738
69021
|
|
|
@@ -68778,16 +69061,16 @@ class PropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component
|
|
|
68778
69061
|
componentDidMount() {
|
|
68779
69062
|
this.props.globalState.stateManager.onSelectionChangedObservable.add((options) => {
|
|
68780
69063
|
const { selection } = options || {};
|
|
68781
|
-
if (selection instanceof
|
|
69064
|
+
if (selection instanceof shared_ui_components_nodeGraphSystem_graphNode__WEBPACK_IMPORTED_MODULE_15__.GraphNode) {
|
|
68782
69065
|
this.setState({ currentNode: selection, currentFrame: null, currentFrameNodePort: null, currentNodePort: null });
|
|
68783
69066
|
}
|
|
68784
|
-
else if (selection instanceof
|
|
69067
|
+
else if (selection instanceof shared_ui_components_nodeGraphSystem_graphFrame__WEBPACK_IMPORTED_MODULE_16__.GraphFrame) {
|
|
68785
69068
|
this.setState({ currentNode: null, currentFrame: selection, currentFrameNodePort: null, currentNodePort: null });
|
|
68786
69069
|
}
|
|
68787
|
-
else if ((0,
|
|
69070
|
+
else if ((0,shared_ui_components_nodeGraphSystem_tools__WEBPACK_IMPORTED_MODULE_18__.IsFramePortData)(selection)) {
|
|
68788
69071
|
this.setState({ currentNode: null, currentFrame: selection.frame, currentFrameNodePort: selection.port, currentNodePort: null });
|
|
68789
69072
|
}
|
|
68790
|
-
else if (selection instanceof
|
|
69073
|
+
else if (selection instanceof shared_ui_components_nodeGraphSystem_nodePort__WEBPACK_IMPORTED_MODULE_17__.NodePort) {
|
|
68791
69074
|
this.setState({ currentNode: null, currentFrame: null, currentFrameNodePort: null, currentNodePort: selection });
|
|
68792
69075
|
}
|
|
68793
69076
|
else {
|
|
@@ -68813,18 +69096,18 @@ class PropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component
|
|
|
68813
69096
|
const cantDisplaySlider = isNaN(block.min) || isNaN(block.max) || block.min === block.max;
|
|
68814
69097
|
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [block.isBoolean && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_sharedComponents_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_7__.CheckBoxLineComponent, { label: block.name, target: block, propertyName: "value", onValueChanged: () => {
|
|
68815
69098
|
this.processInputBlockUpdate(block);
|
|
68816
|
-
} }, block.uniqueId)), !block.isBoolean && cantDisplaySlider && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
69099
|
+
} }, block.uniqueId)), !block.isBoolean && cantDisplaySlider && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_28__.FloatLineComponent, { label: block.name, target: block, propertyName: "value", onChange: () => this.processInputBlockUpdate(block) }, block.uniqueId)), !block.isBoolean && !cantDisplaySlider && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_sliderLineComponent__WEBPACK_IMPORTED_MODULE_29__.SliderLineComponent, { label: block.name, target: block, propertyName: "value", step: (block.max - block.min) / 100.0, minimum: block.min, maximum: block.max, onChange: () => this.processInputBlockUpdate(block) }, block.uniqueId))] }, block.uniqueId));
|
|
68817
69100
|
}
|
|
68818
69101
|
case core_Misc_tools__WEBPACK_IMPORTED_MODULE_5__.NodeMaterialBlockConnectionPointTypes.Color3:
|
|
68819
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
69102
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_color3LineComponent__WEBPACK_IMPORTED_MODULE_23__.Color3LineComponent, { lockObject: this.props.lockObject, label: block.name, target: block, propertyName: "value", onChange: () => this.processInputBlockUpdate(block) }, block.uniqueId));
|
|
68820
69103
|
case core_Misc_tools__WEBPACK_IMPORTED_MODULE_5__.NodeMaterialBlockConnectionPointTypes.Color4:
|
|
68821
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
69104
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_color4LineComponent__WEBPACK_IMPORTED_MODULE_24__.Color4LineComponent, { lockObject: this.props.lockObject, label: block.name, target: block, propertyName: "value", onChange: () => this.processInputBlockUpdate(block) }, block.uniqueId));
|
|
68822
69105
|
case core_Misc_tools__WEBPACK_IMPORTED_MODULE_5__.NodeMaterialBlockConnectionPointTypes.Vector2:
|
|
68823
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
69106
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_vector2LineComponent__WEBPACK_IMPORTED_MODULE_20__.Vector2LineComponent, { lockObject: this.props.lockObject, label: block.name, target: block, propertyName: "value", onChange: () => this.processInputBlockUpdate(block) }, block.uniqueId));
|
|
68824
69107
|
case core_Misc_tools__WEBPACK_IMPORTED_MODULE_5__.NodeMaterialBlockConnectionPointTypes.Vector3:
|
|
68825
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
69108
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_vector3LineComponent__WEBPACK_IMPORTED_MODULE_21__.Vector3LineComponent, { lockObject: this.props.lockObject, label: block.name, target: block, propertyName: "value", onChange: () => this.processInputBlockUpdate(block) }, block.uniqueId));
|
|
68826
69109
|
case core_Misc_tools__WEBPACK_IMPORTED_MODULE_5__.NodeMaterialBlockConnectionPointTypes.Vector4:
|
|
68827
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
69110
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_vector4LineComponent__WEBPACK_IMPORTED_MODULE_22__.Vector4LineComponent, { lockObject: this.props.lockObject, label: block.name, target: block, propertyName: "value", onChange: () => this.processInputBlockUpdate(block) }, block.uniqueId));
|
|
68828
69111
|
}
|
|
68829
69112
|
return null;
|
|
68830
69113
|
}
|
|
@@ -68852,15 +69135,15 @@ class PropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component
|
|
|
68852
69135
|
}
|
|
68853
69136
|
customSave() {
|
|
68854
69137
|
this.setState({ uploadInProgress: true });
|
|
68855
|
-
this.props.globalState.onLogRequiredObservable.notifyObservers(new
|
|
69138
|
+
this.props.globalState.onLogRequiredObservable.notifyObservers(new _log_logComponent__WEBPACK_IMPORTED_MODULE_13__.LogEntry("Saving your material to Babylon.js snippet server...", false));
|
|
68856
69139
|
this.props.globalState
|
|
68857
69140
|
.customSave.action(_serializationTools__WEBPACK_IMPORTED_MODULE_6__.SerializationTools.Serialize(this.props.globalState.nodeMaterial, this.props.globalState))
|
|
68858
69141
|
.then(() => {
|
|
68859
|
-
this.props.globalState.onLogRequiredObservable.notifyObservers(new
|
|
69142
|
+
this.props.globalState.onLogRequiredObservable.notifyObservers(new _log_logComponent__WEBPACK_IMPORTED_MODULE_13__.LogEntry("Material saved successfully", false));
|
|
68860
69143
|
this.setState({ uploadInProgress: false });
|
|
68861
69144
|
})
|
|
68862
69145
|
.catch((err) => {
|
|
68863
|
-
this.props.globalState.onLogRequiredObservable.notifyObservers(new
|
|
69146
|
+
this.props.globalState.onLogRequiredObservable.notifyObservers(new _log_logComponent__WEBPACK_IMPORTED_MODULE_13__.LogEntry(err, true));
|
|
68864
69147
|
this.setState({ uploadInProgress: false });
|
|
68865
69148
|
});
|
|
68866
69149
|
}
|
|
@@ -68956,10 +69239,10 @@ class PropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component
|
|
|
68956
69239
|
}
|
|
68957
69240
|
switch (value) {
|
|
68958
69241
|
case core_Misc_tools__WEBPACK_IMPORTED_MODULE_5__.NodeMaterialModes.Material:
|
|
68959
|
-
this.props.globalState.previewType =
|
|
69242
|
+
this.props.globalState.previewType = _preview_previewType__WEBPACK_IMPORTED_MODULE_11__.PreviewType.Sphere;
|
|
68960
69243
|
break;
|
|
68961
69244
|
case core_Misc_tools__WEBPACK_IMPORTED_MODULE_5__.NodeMaterialModes.Particle:
|
|
68962
|
-
this.props.globalState.previewType =
|
|
69245
|
+
this.props.globalState.previewType = _preview_previewType__WEBPACK_IMPORTED_MODULE_11__.PreviewType.Bubbles;
|
|
68963
69246
|
break;
|
|
68964
69247
|
}
|
|
68965
69248
|
this.props.globalState.listOfCustomPreviewFiles = [];
|
|
@@ -68975,13 +69258,13 @@ class PropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component
|
|
|
68975
69258
|
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ id: "propertyTab" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ id: "header" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("img", { id: "logo", src: "https://www.babylonjs.com/Assets/logo-babylonjs-social-twitter.png" }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ id: "title" }, { children: "NODE MATERIAL EDITOR" }))] })), ((_a = this.state.currentNode) === null || _a === void 0 ? void 0 : _a.renderProperties()) || ((_b = this.state.currentNodePort) === null || _b === void 0 ? void 0 : _b.node.renderProperties())] })));
|
|
68976
69259
|
}
|
|
68977
69260
|
if (this.state.currentFrameNodePort && this.state.currentFrame) {
|
|
68978
|
-
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
69261
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_graphSystem_properties_frameNodePortPropertyComponent__WEBPACK_IMPORTED_MODULE_9__.FrameNodePortPropertyTabComponent, { globalState: this.props.globalState, stateManager: this.props.globalState.stateManager, frame: this.state.currentFrame, frameNodePort: this.state.currentFrameNodePort }));
|
|
68979
69262
|
}
|
|
68980
69263
|
if (this.state.currentNodePort) {
|
|
68981
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
69264
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_graphSystem_properties_nodePortPropertyComponent__WEBPACK_IMPORTED_MODULE_10__.NodePortPropertyTabComponent, { stateManager: this.props.globalState.stateManager, nodePort: this.state.currentNodePort });
|
|
68982
69265
|
}
|
|
68983
69266
|
if (this.state.currentFrame) {
|
|
68984
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
69267
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_graphSystem_properties_framePropertyComponent__WEBPACK_IMPORTED_MODULE_8__.FramePropertyTabComponent, { globalState: this.props.globalState, frame: this.state.currentFrame });
|
|
68985
69268
|
}
|
|
68986
69269
|
const gridSize = core_Misc_tools__WEBPACK_IMPORTED_MODULE_5__.DataStorage.ReadNumber("GridSize", 20);
|
|
68987
69270
|
const modeList = [
|
|
@@ -68999,7 +69282,7 @@ class PropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component
|
|
|
68999
69282
|
{ label: "Maximized", value: core_Misc_tools__WEBPACK_IMPORTED_MODULE_5__.Constants.ALPHA_MAXIMIZED },
|
|
69000
69283
|
{ label: "Pre-multiplied", value: core_Misc_tools__WEBPACK_IMPORTED_MODULE_5__.Constants.ALPHA_PREMULTIPLIED },
|
|
69001
69284
|
];
|
|
69002
|
-
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ id: "propertyTab" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ id: "header" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("img", { id: "logo", src: "https://www.babylonjs.com/Assets/logo-babylonjs-social-twitter.png" }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ id: "title" }, { children: "NODE MATERIAL EDITOR" }))] })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_sharedComponents_lineContainerComponent__WEBPACK_IMPORTED_MODULE_2__.LineContainerComponent, Object.assign({ title: "GENERAL" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
69285
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ id: "propertyTab" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ id: "header" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("img", { id: "logo", src: "https://www.babylonjs.com/Assets/logo-babylonjs-social-twitter.png" }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ id: "title" }, { children: "NODE MATERIAL EDITOR" }))] })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_sharedComponents_lineContainerComponent__WEBPACK_IMPORTED_MODULE_2__.LineContainerComponent, Object.assign({ title: "GENERAL" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_optionsLineComponent__WEBPACK_IMPORTED_MODULE_26__.OptionsLineComponent, { ref: this._modeSelect, label: "Mode", target: this, extractValue: () => this.props.globalState.mode, options: modeList, onSelect: (value) => this.changeMode(value), propertyName: "" }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_textLineComponent__WEBPACK_IMPORTED_MODULE_27__.TextLineComponent, { label: "Version", value: core_Misc_tools__WEBPACK_IMPORTED_MODULE_5__.Engine.Version }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_textLineComponent__WEBPACK_IMPORTED_MODULE_27__.TextLineComponent, { label: "Help", value: "doc.babylonjs.com", underline: true, onLink: () => this.props.globalState.hostDocument.defaultView.open("https://doc.babylonjs.com/how_to/node_material", "_blank") }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_19__.TextInputLineComponent, { label: "Comment", multilines: true, lockObject: this.props.globalState.lockObject, value: this.props.globalState.nodeMaterial.comment, target: this.props.globalState.nodeMaterial, propertyName: "comment" }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_buttonLineComponent__WEBPACK_IMPORTED_MODULE_25__.ButtonLineComponent, { label: "Reset to default", onClick: () => {
|
|
69003
69286
|
switch (this.props.globalState.mode) {
|
|
69004
69287
|
case core_Misc_tools__WEBPACK_IMPORTED_MODULE_5__.NodeMaterialModes.Material:
|
|
69005
69288
|
this.props.globalState.nodeMaterial.setToDefault();
|
|
@@ -69015,31 +69298,31 @@ class PropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component
|
|
|
69015
69298
|
break;
|
|
69016
69299
|
}
|
|
69017
69300
|
this.props.globalState.onResetRequiredObservable.notifyObservers(true);
|
|
69018
|
-
} })] })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_sharedComponents_lineContainerComponent__WEBPACK_IMPORTED_MODULE_2__.LineContainerComponent, Object.assign({ title: "UI" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
69301
|
+
} })] })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_sharedComponents_lineContainerComponent__WEBPACK_IMPORTED_MODULE_2__.LineContainerComponent, Object.assign({ title: "UI" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_buttonLineComponent__WEBPACK_IMPORTED_MODULE_25__.ButtonLineComponent, { label: "Zoom to fit", onClick: () => {
|
|
69019
69302
|
this.props.globalState.onZoomToFitRequiredObservable.notifyObservers();
|
|
69020
|
-
} }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
69303
|
+
} }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_buttonLineComponent__WEBPACK_IMPORTED_MODULE_25__.ButtonLineComponent, { label: "Reorganize", onClick: () => {
|
|
69021
69304
|
this.props.globalState.onReOrganizedRequiredObservable.notifyObservers();
|
|
69022
69305
|
} })] })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_sharedComponents_lineContainerComponent__WEBPACK_IMPORTED_MODULE_2__.LineContainerComponent, Object.assign({ title: "OPTIONS" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_sharedComponents_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_7__.CheckBoxLineComponent, { label: "Embed textures when saving", isSelected: () => core_Misc_tools__WEBPACK_IMPORTED_MODULE_5__.DataStorage.ReadBoolean("EmbedTextures", true), onSelect: (value) => {
|
|
69023
69306
|
core_Misc_tools__WEBPACK_IMPORTED_MODULE_5__.DataStorage.WriteBoolean("EmbedTextures", value);
|
|
69024
|
-
} }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
69307
|
+
} }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_sliderLineComponent__WEBPACK_IMPORTED_MODULE_29__.SliderLineComponent, { label: "Grid size", minimum: 0, maximum: 100, step: 5, decimalCount: 0, directValue: gridSize, onChange: (value) => {
|
|
69025
69308
|
core_Misc_tools__WEBPACK_IMPORTED_MODULE_5__.DataStorage.WriteNumber("GridSize", value);
|
|
69026
69309
|
this.props.globalState.stateManager.onGridSizeChanged.notifyObservers();
|
|
69027
69310
|
this.forceUpdate();
|
|
69028
69311
|
} }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_sharedComponents_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_7__.CheckBoxLineComponent, { label: "Show grid", isSelected: () => core_Misc_tools__WEBPACK_IMPORTED_MODULE_5__.DataStorage.ReadBoolean("ShowGrid", true), onSelect: (value) => {
|
|
69029
69312
|
core_Misc_tools__WEBPACK_IMPORTED_MODULE_5__.DataStorage.WriteBoolean("ShowGrid", value);
|
|
69030
69313
|
this.props.globalState.stateManager.onGridSizeChanged.notifyObservers();
|
|
69031
|
-
} })] })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_sharedComponents_lineContainerComponent__WEBPACK_IMPORTED_MODULE_2__.LineContainerComponent, Object.assign({ 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)(
|
|
69314
|
+
} })] })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_sharedComponents_lineContainerComponent__WEBPACK_IMPORTED_MODULE_2__.LineContainerComponent, Object.assign({ 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_25__.ButtonLineComponent, { label: "Save", onClick: () => {
|
|
69032
69315
|
this.save();
|
|
69033
|
-
} }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
69316
|
+
} }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_buttonLineComponent__WEBPACK_IMPORTED_MODULE_25__.ButtonLineComponent, { label: "Generate code", onClick: () => {
|
|
69034
69317
|
shared_ui_components_stringTools__WEBPACK_IMPORTED_MODULE_3__.StringTools.DownloadAsFile(this.props.globalState.hostDocument, this.props.globalState.nodeMaterial.generateCode(), "code.txt");
|
|
69035
|
-
} }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
69318
|
+
} }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_buttonLineComponent__WEBPACK_IMPORTED_MODULE_25__.ButtonLineComponent, { label: "Export shaders", onClick: () => {
|
|
69036
69319
|
this.props.globalState.nodeMaterial.build();
|
|
69037
69320
|
shared_ui_components_stringTools__WEBPACK_IMPORTED_MODULE_3__.StringTools.DownloadAsFile(this.props.globalState.hostDocument, this.props.globalState.nodeMaterial.compiledShaders, "shaders.txt");
|
|
69038
|
-
} }), this.props.globalState.customSave && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
69321
|
+
} }), this.props.globalState.customSave && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_buttonLineComponent__WEBPACK_IMPORTED_MODULE_25__.ButtonLineComponent, { label: this.props.globalState.customSave.label, isDisabled: this.state.uploadInProgress, onClick: () => {
|
|
69039
69322
|
this.customSave();
|
|
69040
|
-
} })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_sharedComponents_fileButtonLineComponent__WEBPACK_IMPORTED_MODULE_4__.FileButtonLineComponent, { label: "Load Frame", uploadName: "frame-upload", onClick: (file) => this.loadFrame(file), accept: ".json" })] })), !this.props.globalState.customSave && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_sharedComponents_lineContainerComponent__WEBPACK_IMPORTED_MODULE_2__.LineContainerComponent, Object.assign({ title: "SNIPPET" }, { children: [this.props.globalState.nodeMaterial.snippetId && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
69323
|
+
} })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_sharedComponents_fileButtonLineComponent__WEBPACK_IMPORTED_MODULE_4__.FileButtonLineComponent, { label: "Load Frame", uploadName: "frame-upload", onClick: (file) => this.loadFrame(file), accept: ".json" })] })), !this.props.globalState.customSave && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_sharedComponents_lineContainerComponent__WEBPACK_IMPORTED_MODULE_2__.LineContainerComponent, Object.assign({ title: "SNIPPET" }, { children: [this.props.globalState.nodeMaterial.snippetId && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_textLineComponent__WEBPACK_IMPORTED_MODULE_27__.TextLineComponent, { label: "Snippet ID", value: this.props.globalState.nodeMaterial.snippetId }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_buttonLineComponent__WEBPACK_IMPORTED_MODULE_25__.ButtonLineComponent, { label: "Load from snippet server", onClick: () => this.loadFromSnippet() }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_buttonLineComponent__WEBPACK_IMPORTED_MODULE_25__.ButtonLineComponent, { label: "Save to snippet server", onClick: () => {
|
|
69041
69324
|
this.saveToSnippetServer();
|
|
69042
|
-
} })] }))), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_sharedComponents_lineContainerComponent__WEBPACK_IMPORTED_MODULE_2__.LineContainerComponent, Object.assign({ title: "TRANSPARENCY" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_sharedComponents_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_7__.CheckBoxLineComponent, { label: "Force alpha blending", target: this.props.globalState.nodeMaterial, propertyName: "forceAlphaBlending", onValueChanged: () => this.props.globalState.stateManager.onUpdateRequiredObservable.notifyObservers(null) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
69325
|
+
} })] }))), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_sharedComponents_lineContainerComponent__WEBPACK_IMPORTED_MODULE_2__.LineContainerComponent, Object.assign({ title: "TRANSPARENCY" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_sharedComponents_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_7__.CheckBoxLineComponent, { label: "Force alpha blending", target: this.props.globalState.nodeMaterial, propertyName: "forceAlphaBlending", onValueChanged: () => this.props.globalState.stateManager.onUpdateRequiredObservable.notifyObservers(null) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_optionsLineComponent__WEBPACK_IMPORTED_MODULE_26__.OptionsLineComponent, { label: "Alpha mode", options: alphaModeOptions, target: this.props.globalState.nodeMaterial, propertyName: "alphaMode", onSelect: () => this.props.globalState.stateManager.onUpdateRequiredObservable.notifyObservers(null) })] })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_inputsPropertyTabComponent__WEBPACK_IMPORTED_MODULE_12__.InputsPropertyTabComponent, { lockObject: this.props.lockObject, globalState: this.props.globalState, inputs: this.props.globalState.nodeMaterial.getInputBlocks() })] })] })));
|
|
69043
69326
|
}
|
|
69044
69327
|
}
|
|
69045
69328
|
|
|
@@ -69164,9 +69447,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
69164
69447
|
/* harmony import */ var _sharedComponents_popup__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./sharedComponents/popup */ "../../../tools/nodeEditor/dist/sharedComponents/popup.js");
|
|
69165
69448
|
/* harmony import */ var _main_scss__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./main.scss */ "../../../tools/nodeEditor/dist/main.scss");
|
|
69166
69449
|
/* harmony import */ var shared_ui_components_nodeGraphSystem_graphCanvas__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! shared-ui-components/nodeGraphSystem/graphCanvas */ "../../../dev/sharedUiComponents/dist/nodeGraphSystem/graphCanvas.js");
|
|
69167
|
-
/* harmony import */ var
|
|
69168
|
-
/* harmony import */ var shared_ui_components_nodeGraphSystem_typeLedger__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! shared-ui-components/nodeGraphSystem/typeLedger */ "../../../dev/sharedUiComponents/dist/nodeGraphSystem/typeLedger.js");
|
|
69169
|
-
|
|
69450
|
+
/* harmony import */ var shared_ui_components_nodeGraphSystem_typeLedger__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! shared-ui-components/nodeGraphSystem/typeLedger */ "../../../dev/sharedUiComponents/dist/nodeGraphSystem/typeLedger.js");
|
|
69170
69451
|
|
|
69171
69452
|
|
|
69172
69453
|
|
|
@@ -69193,8 +69474,6 @@ class GraphEditor extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
|
|
|
69193
69474
|
super(props);
|
|
69194
69475
|
this._leftWidth = core_Materials_Node_nodeMaterialBlock__WEBPACK_IMPORTED_MODULE_2__.DataStorage.ReadNumber("LeftWidth", 200);
|
|
69195
69476
|
this._rightWidth = core_Materials_Node_nodeMaterialBlock__WEBPACK_IMPORTED_MODULE_2__.DataStorage.ReadNumber("RightWidth", 300);
|
|
69196
|
-
this._copiedNodes = [];
|
|
69197
|
-
this._copiedFrames = [];
|
|
69198
69477
|
this._mouseLocationX = 0;
|
|
69199
69478
|
this._mouseLocationY = 0;
|
|
69200
69479
|
this.handlePopUp = () => {
|
|
@@ -69385,115 +69664,20 @@ class GraphEditor extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
|
|
|
69385
69664
|
return this._graphCanvas.findNodeFromData(block);
|
|
69386
69665
|
};
|
|
69387
69666
|
this.props.globalState.hostDocument.addEventListener("keydown", (evt) => {
|
|
69388
|
-
|
|
69389
|
-
|
|
69390
|
-
|
|
69391
|
-
|
|
69392
|
-
|
|
69393
|
-
|
|
69394
|
-
|
|
69395
|
-
this._graphCanvas.removeDataFromCache(targetBlock);
|
|
69396
|
-
}
|
|
69397
|
-
if (this._graphCanvas.selectedLink) {
|
|
69398
|
-
this._graphCanvas.selectedLink.dispose();
|
|
69399
|
-
}
|
|
69400
|
-
if (this._graphCanvas.selectedFrames.length) {
|
|
69401
|
-
for (const frame of this._graphCanvas.selectedFrames) {
|
|
69402
|
-
if (frame.isCollapsed) {
|
|
69403
|
-
while (frame.nodes.length > 0) {
|
|
69404
|
-
const targetBlock = frame.nodes[0].content.data;
|
|
69405
|
-
this.props.globalState.nodeMaterial.removeBlock(targetBlock);
|
|
69406
|
-
this._graphCanvas.removeDataFromCache(targetBlock);
|
|
69407
|
-
frame.nodes[0].dispose();
|
|
69408
|
-
}
|
|
69409
|
-
frame.isCollapsed = false;
|
|
69410
|
-
}
|
|
69411
|
-
else {
|
|
69412
|
-
frame.nodes.forEach((node) => {
|
|
69413
|
-
node.enclosingFrameId = -1;
|
|
69414
|
-
});
|
|
69415
|
-
}
|
|
69416
|
-
frame.dispose();
|
|
69417
|
-
}
|
|
69418
|
-
}
|
|
69419
|
-
this.props.globalState.stateManager.onSelectionChangedObservable.notifyObservers(null);
|
|
69420
|
-
this.props.globalState.stateManager.onRebuildRequiredObservable.notifyObservers(false);
|
|
69421
|
-
return;
|
|
69422
|
-
}
|
|
69423
|
-
if (!evt.ctrlKey || this.props.globalState.lockObject.lock) {
|
|
69424
|
-
return;
|
|
69425
|
-
}
|
|
69426
|
-
if (evt.key === "c" || evt.key === "C") {
|
|
69427
|
-
// Copy
|
|
69428
|
-
this._copiedNodes = [];
|
|
69429
|
-
this._copiedFrames = [];
|
|
69430
|
-
if (this._graphCanvas.selectedFrames.length) {
|
|
69431
|
-
for (const frame of this._graphCanvas.selectedFrames) {
|
|
69432
|
-
frame.serialize(true);
|
|
69433
|
-
this._copiedFrames.push(frame);
|
|
69434
|
-
}
|
|
69435
|
-
return;
|
|
69436
|
-
}
|
|
69437
|
-
const selectedItems = this._graphCanvas.selectedNodes;
|
|
69438
|
-
if (!selectedItems.length) {
|
|
69439
|
-
return;
|
|
69440
|
-
}
|
|
69441
|
-
const selectedItem = selectedItems[0];
|
|
69442
|
-
if (!selectedItem.content.data) {
|
|
69443
|
-
return;
|
|
69444
|
-
}
|
|
69445
|
-
this._copiedNodes = selectedItems.slice(0);
|
|
69446
|
-
}
|
|
69447
|
-
else if (evt.key === "v" || evt.key === "V") {
|
|
69448
|
-
// Paste
|
|
69449
|
-
const rootElement = this.props.globalState.hostDocument.querySelector(".diagram-container");
|
|
69450
|
-
const zoomLevel = this._graphCanvas.zoom;
|
|
69451
|
-
let currentY = (this._mouseLocationY - rootElement.offsetTop - this._graphCanvas.y - 20) / zoomLevel;
|
|
69452
|
-
if (this._copiedFrames.length) {
|
|
69453
|
-
for (const frame of this._copiedFrames) {
|
|
69454
|
-
// New frame
|
|
69455
|
-
const newFrame = new shared_ui_components_nodeGraphSystem_graphFrame__WEBPACK_IMPORTED_MODULE_17__.GraphFrame(null, this._graphCanvas, true);
|
|
69456
|
-
this._graphCanvas.frames.push(newFrame);
|
|
69457
|
-
newFrame.width = frame.width;
|
|
69458
|
-
newFrame.height = frame.height;
|
|
69459
|
-
newFrame.width / 2;
|
|
69460
|
-
newFrame.name = frame.name;
|
|
69461
|
-
newFrame.color = frame.color;
|
|
69462
|
-
let currentX = (this._mouseLocationX - rootElement.offsetLeft - this._graphCanvas.x) / zoomLevel;
|
|
69463
|
-
newFrame.x = currentX - newFrame.width / 2;
|
|
69464
|
-
newFrame.y = currentY;
|
|
69465
|
-
// Paste nodes
|
|
69466
|
-
if (frame.nodes.length) {
|
|
69467
|
-
currentX = newFrame.x + frame.nodes[0].x - frame.x;
|
|
69468
|
-
currentY = newFrame.y + frame.nodes[0].y - frame.y;
|
|
69469
|
-
this._graphCanvas._frameIsMoving = true;
|
|
69470
|
-
const newNodes = this.pasteSelection(frame.nodes, currentX, currentY);
|
|
69471
|
-
if (newNodes) {
|
|
69472
|
-
for (const node of newNodes) {
|
|
69473
|
-
newFrame.syncNode(node);
|
|
69474
|
-
}
|
|
69475
|
-
}
|
|
69476
|
-
this._graphCanvas._frameIsMoving = false;
|
|
69477
|
-
}
|
|
69478
|
-
newFrame.adjustPorts();
|
|
69479
|
-
if (frame.isCollapsed) {
|
|
69480
|
-
newFrame.isCollapsed = true;
|
|
69481
|
-
}
|
|
69482
|
-
// Select
|
|
69483
|
-
this.props.globalState.stateManager.onSelectionChangedObservable.notifyObservers({ selection: newFrame, forceKeepSelection: true });
|
|
69484
|
-
return;
|
|
69485
|
-
}
|
|
69486
|
-
}
|
|
69487
|
-
if (!this._copiedNodes.length) {
|
|
69488
|
-
return;
|
|
69667
|
+
this._graphCanvas.handleKeyDown(evt, (nodeData) => {
|
|
69668
|
+
this.props.globalState.nodeMaterial.removeBlock(nodeData.data);
|
|
69669
|
+
}, this._mouseLocationX, this._mouseLocationY, (nodeData) => {
|
|
69670
|
+
const block = nodeData.data;
|
|
69671
|
+
const clone = block.clone(this.props.globalState.nodeMaterial.getScene());
|
|
69672
|
+
if (!clone) {
|
|
69673
|
+
return null;
|
|
69489
69674
|
}
|
|
69490
|
-
|
|
69491
|
-
|
|
69492
|
-
|
|
69493
|
-
}, false);
|
|
69675
|
+
return this.appendBlock(clone, false);
|
|
69676
|
+
}, this.props.globalState.hostDocument.querySelector(".diagram-container"));
|
|
69677
|
+
});
|
|
69494
69678
|
}
|
|
69495
69679
|
appendBlock(dataToAppend, recursion = true) {
|
|
69496
|
-
return this._graphCanvas.createNodeFromObject(dataToAppend instanceof core_Materials_Node_nodeMaterialBlock__WEBPACK_IMPORTED_MODULE_2__.NodeMaterialBlock ?
|
|
69680
|
+
return this._graphCanvas.createNodeFromObject(dataToAppend instanceof core_Materials_Node_nodeMaterialBlock__WEBPACK_IMPORTED_MODULE_2__.NodeMaterialBlock ? shared_ui_components_nodeGraphSystem_typeLedger__WEBPACK_IMPORTED_MODULE_17__.TypeLedger.NodeDataBuilder(dataToAppend, this._graphCanvas) : dataToAppend, (block) => {
|
|
69497
69681
|
if (this.props.globalState.nodeMaterial.attachedBlocks.indexOf(block) === -1) {
|
|
69498
69682
|
this.props.globalState.nodeMaterial.attachedBlocks.push(block);
|
|
69499
69683
|
}
|
|
@@ -69533,83 +69717,6 @@ class GraphEditor extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
|
|
|
69533
69717
|
this._previewManager = null;
|
|
69534
69718
|
}
|
|
69535
69719
|
}
|
|
69536
|
-
reconnectNewNodes(nodeIndex, newNodes, sourceNodes, done) {
|
|
69537
|
-
if (done[nodeIndex]) {
|
|
69538
|
-
return;
|
|
69539
|
-
}
|
|
69540
|
-
const currentNode = newNodes[nodeIndex];
|
|
69541
|
-
const sourceNode = sourceNodes[nodeIndex];
|
|
69542
|
-
for (let inputIndex = 0; inputIndex < sourceNode.content.inputs.length; inputIndex++) {
|
|
69543
|
-
const sourceInput = sourceNode.content.inputs[inputIndex];
|
|
69544
|
-
const currentInput = currentNode.content.inputs[inputIndex];
|
|
69545
|
-
if (!sourceInput.isConnected) {
|
|
69546
|
-
continue;
|
|
69547
|
-
}
|
|
69548
|
-
const sourceBlock = this._graphCanvas.findNodeFromData(sourceInput.connectedPort.ownerData).content;
|
|
69549
|
-
const activeNodes = sourceNodes.filter((s) => s.content.data === sourceBlock);
|
|
69550
|
-
if (activeNodes.length > 0) {
|
|
69551
|
-
const activeNode = activeNodes[0];
|
|
69552
|
-
const indexInList = sourceNodes.indexOf(activeNode);
|
|
69553
|
-
// First make sure to connect the other one
|
|
69554
|
-
this.reconnectNewNodes(indexInList, newNodes, sourceNodes, done);
|
|
69555
|
-
// Then reconnect
|
|
69556
|
-
const outputIndex = sourceBlock.outputs.indexOf(sourceInput.connectedPort);
|
|
69557
|
-
const newOutput = newNodes[indexInList].content.data.outputs[outputIndex];
|
|
69558
|
-
newOutput.connectTo(currentInput);
|
|
69559
|
-
}
|
|
69560
|
-
else {
|
|
69561
|
-
// Connect with outside blocks
|
|
69562
|
-
sourceInput.connectedPort.connectTo(currentInput);
|
|
69563
|
-
}
|
|
69564
|
-
this._graphCanvas.connectPorts(currentInput.connectedPort, currentInput);
|
|
69565
|
-
}
|
|
69566
|
-
currentNode.refresh();
|
|
69567
|
-
done[nodeIndex] = true;
|
|
69568
|
-
}
|
|
69569
|
-
pasteSelection(copiedNodes, currentX, currentY, selectNew = false) {
|
|
69570
|
-
let originalNode = null;
|
|
69571
|
-
const newNodes = [];
|
|
69572
|
-
// Copy to prevent recursive side effects while creating nodes.
|
|
69573
|
-
copiedNodes = copiedNodes.slice();
|
|
69574
|
-
// Cancel selection
|
|
69575
|
-
this.props.globalState.stateManager.onSelectionChangedObservable.notifyObservers(null);
|
|
69576
|
-
// Create new nodes
|
|
69577
|
-
for (const node of copiedNodes) {
|
|
69578
|
-
const block = node.content.data;
|
|
69579
|
-
if (!block) {
|
|
69580
|
-
continue;
|
|
69581
|
-
}
|
|
69582
|
-
const clone = block.clone(this.props.globalState.nodeMaterial.getScene());
|
|
69583
|
-
if (!clone) {
|
|
69584
|
-
return;
|
|
69585
|
-
}
|
|
69586
|
-
const newNode = this.appendBlock(clone, false);
|
|
69587
|
-
let x = 0;
|
|
69588
|
-
let y = 0;
|
|
69589
|
-
if (originalNode) {
|
|
69590
|
-
x = currentX + node.x - originalNode.x;
|
|
69591
|
-
y = currentY + node.y - originalNode.y;
|
|
69592
|
-
}
|
|
69593
|
-
else {
|
|
69594
|
-
originalNode = node;
|
|
69595
|
-
x = currentX;
|
|
69596
|
-
y = currentY;
|
|
69597
|
-
}
|
|
69598
|
-
newNode.x = x;
|
|
69599
|
-
newNode.y = y;
|
|
69600
|
-
newNode.cleanAccumulation();
|
|
69601
|
-
newNodes.push(newNode);
|
|
69602
|
-
if (selectNew) {
|
|
69603
|
-
this.props.globalState.stateManager.onSelectionChangedObservable.notifyObservers({ selection: newNode, forceKeepSelection: true });
|
|
69604
|
-
}
|
|
69605
|
-
}
|
|
69606
|
-
// Relink
|
|
69607
|
-
const done = new Array(newNodes.length);
|
|
69608
|
-
for (let index = 0; index < newNodes.length; index++) {
|
|
69609
|
-
this.reconnectNewNodes(index, newNodes, copiedNodes, done);
|
|
69610
|
-
}
|
|
69611
|
-
return newNodes;
|
|
69612
|
-
}
|
|
69613
69720
|
zoomToFit() {
|
|
69614
69721
|
this._graphCanvas.zoomToFit();
|
|
69615
69722
|
}
|
|
@@ -69747,7 +69854,7 @@ class GraphEditor extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
|
|
|
69747
69854
|
if (storageData) {
|
|
69748
69855
|
const frameData = JSON.parse(storageData);
|
|
69749
69856
|
//edit position before loading.
|
|
69750
|
-
const newX = (targetX - this._graphCanvas.x -
|
|
69857
|
+
const newX = (targetX - this._graphCanvas.x - shared_ui_components_nodeGraphSystem_graphCanvas__WEBPACK_IMPORTED_MODULE_16__.GraphCanvasComponent.NodeWidth) / this._graphCanvas.zoom;
|
|
69751
69858
|
const newY = (targetY - this._graphCanvas.y - 20) / this._graphCanvas.zoom;
|
|
69752
69859
|
const oldX = frameData.editorData.frames[0].x;
|
|
69753
69860
|
const oldY = frameData.editorData.frames[0].y;
|
|
@@ -69788,37 +69895,14 @@ class GraphEditor extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
|
|
|
69788
69895
|
newNode = this.appendBlock(block);
|
|
69789
69896
|
}
|
|
69790
69897
|
// Size exceptions
|
|
69791
|
-
let offsetX =
|
|
69898
|
+
let offsetX = shared_ui_components_nodeGraphSystem_graphCanvas__WEBPACK_IMPORTED_MODULE_16__.GraphCanvasComponent.NodeWidth;
|
|
69792
69899
|
let offsetY = 20;
|
|
69793
69900
|
if (blockType === "ElbowBlock") {
|
|
69794
69901
|
offsetX = 10;
|
|
69795
69902
|
offsetY = 10;
|
|
69796
69903
|
}
|
|
69797
69904
|
// Drop
|
|
69798
|
-
|
|
69799
|
-
let y = targetY - this._graphCanvas.y - offsetY * this._graphCanvas.zoom;
|
|
69800
|
-
newNode.x = x / this._graphCanvas.zoom;
|
|
69801
|
-
newNode.y = y / this._graphCanvas.zoom;
|
|
69802
|
-
newNode.cleanAccumulation();
|
|
69803
|
-
this.props.globalState.stateManager.onNewNodeCreatedObservable.notifyObservers(newNode);
|
|
69804
|
-
this.props.globalState.stateManager.onSelectionChangedObservable.notifyObservers(null);
|
|
69805
|
-
this.props.globalState.stateManager.onSelectionChangedObservable.notifyObservers({ selection: newNode });
|
|
69806
|
-
const block = newNode.content.data;
|
|
69807
|
-
x -= GraphEditor.NodeWidth + 150;
|
|
69808
|
-
block.inputs.forEach((connection) => {
|
|
69809
|
-
if (connection.connectedPoint) {
|
|
69810
|
-
const existingNodes = this._graphCanvas.nodes.filter((n) => {
|
|
69811
|
-
return n.content.data === connection.connectedPoint.ownerBlock;
|
|
69812
|
-
});
|
|
69813
|
-
const connectedNode = existingNodes[0];
|
|
69814
|
-
if (connectedNode.x === 0 && connectedNode.y === 0) {
|
|
69815
|
-
connectedNode.x = x / this._graphCanvas.zoom;
|
|
69816
|
-
connectedNode.y = y / this._graphCanvas.zoom;
|
|
69817
|
-
connectedNode.cleanAccumulation();
|
|
69818
|
-
y += 80;
|
|
69819
|
-
}
|
|
69820
|
-
}
|
|
69821
|
-
});
|
|
69905
|
+
this._graphCanvas.drop(newNode, targetX, targetY, offsetX, offsetY);
|
|
69822
69906
|
this.forceUpdate();
|
|
69823
69907
|
}
|
|
69824
69908
|
dropNewBlock(event) {
|
|
@@ -69842,10 +69926,9 @@ class GraphEditor extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
|
|
|
69842
69926
|
event.preventDefault();
|
|
69843
69927
|
} }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_nodeGraphSystem_graphCanvas__WEBPACK_IMPORTED_MODULE_16__.GraphCanvasComponent, { ref: this._graphCanvasRef, stateManager: this.props.globalState.stateManager, onEmitNewNode: (nodeData) => {
|
|
69844
69928
|
return this.appendBlock(nodeData.data);
|
|
69845
|
-
} }) })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { id: "rightGrab", onPointerDown: (evt) => this.onPointerDown(evt), onPointerUp: (evt) => this.onPointerUp(evt), onPointerMove: (evt) => this.resizeColumns(evt, false) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ className: "right-panel" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_propertyTab_propertyTabComponent__WEBPACK_IMPORTED_MODULE_4__.PropertyTabComponent, { globalState: this.props.globalState }), !this.state.showPreviewPopUp ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_preview_previewMeshControlComponent__WEBPACK_IMPORTED_MODULE_10__.PreviewMeshControlComponent, { globalState: this.props.globalState, togglePreviewAreaComponent: this.handlePopUp }) : null, !this.state.showPreviewPopUp ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_preview_previewAreaComponent__WEBPACK_IMPORTED_MODULE_11__.PreviewAreaComponent, { globalState: this.props.globalState, width: this._rightWidth }) : null] })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_log_logComponent__WEBPACK_IMPORTED_MODULE_6__.LogComponent, { globalState: this.props.globalState })] })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_sharedComponents_messageDialog__WEBPACK_IMPORTED_MODULE_7__.MessageDialogComponent, { globalState: this.props.globalState }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "blocker" }, { children: "Node Material Editor runs only on desktop" })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "wait-screen hidden" }, { children: "Processing...please wait" }))] })));
|
|
69929
|
+
} }) })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { id: "rightGrab", onPointerDown: (evt) => this.onPointerDown(evt), onPointerUp: (evt) => this.onPointerUp(evt), onPointerMove: (evt) => this.resizeColumns(evt, false) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ className: "right-panel" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_propertyTab_propertyTabComponent__WEBPACK_IMPORTED_MODULE_4__.PropertyTabComponent, { lockObject: this.props.globalState.lockObject, globalState: this.props.globalState }), !this.state.showPreviewPopUp ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_preview_previewMeshControlComponent__WEBPACK_IMPORTED_MODULE_10__.PreviewMeshControlComponent, { globalState: this.props.globalState, togglePreviewAreaComponent: this.handlePopUp }) : null, !this.state.showPreviewPopUp ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_preview_previewAreaComponent__WEBPACK_IMPORTED_MODULE_11__.PreviewAreaComponent, { globalState: this.props.globalState, width: this._rightWidth }) : null] })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_log_logComponent__WEBPACK_IMPORTED_MODULE_6__.LogComponent, { globalState: this.props.globalState })] })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_sharedComponents_messageDialog__WEBPACK_IMPORTED_MODULE_7__.MessageDialogComponent, { globalState: this.props.globalState }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "blocker" }, { children: "Node Material Editor runs only on desktop" })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "wait-screen hidden" }, { children: "Processing...please wait" }))] })));
|
|
69846
69930
|
}
|
|
69847
69931
|
}
|
|
69848
|
-
GraphEditor.NodeWidth = 100;
|
|
69849
69932
|
|
|
69850
69933
|
|
|
69851
69934
|
/***/ }),
|
|
@@ -70928,13 +71011,13 @@ class FramePropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Compo
|
|
|
70928
71011
|
configurableInputBlocks = configurableInputBlocks.sort((a, b) => {
|
|
70929
71012
|
return a.name.localeCompare(b.name);
|
|
70930
71013
|
});
|
|
70931
|
-
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ id: "propertyTab" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ id: "header" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("img", { id: "logo", src: "https://www.babylonjs.com/Assets/logo-babylonjs-social-twitter.png" }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ id: "title" }, { children: "NODE MATERIAL EDITOR" }))] })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_sharedComponents_lineContainerComponent__WEBPACK_IMPORTED_MODULE_2__.LineContainerComponent, Object.assign({ title: "GENERAL" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_4__.TextInputLineComponent, { label: "Name", propertyName: "name", lockObject: this.props.globalState.lockObject, target: this.props.frame }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_color3LineComponent__WEBPACK_IMPORTED_MODULE_5__.Color3LineComponent, { label: "Color", target: this.props.frame, propertyName: "color" }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_4__.TextInputLineComponent, { lockObject: this.props.globalState.lockObject, label: "Comments", propertyName: "comments", target: this.props.frame }), !this.props.frame.isCollapsed && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_buttonLineComponent__WEBPACK_IMPORTED_MODULE_6__.ButtonLineComponent, { label: "Collapse", onClick: () => {
|
|
71014
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ id: "propertyTab" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ id: "header" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("img", { id: "logo", src: "https://www.babylonjs.com/Assets/logo-babylonjs-social-twitter.png" }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ id: "title" }, { children: "NODE MATERIAL EDITOR" }))] })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_sharedComponents_lineContainerComponent__WEBPACK_IMPORTED_MODULE_2__.LineContainerComponent, Object.assign({ title: "GENERAL" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_4__.TextInputLineComponent, { label: "Name", propertyName: "name", lockObject: this.props.globalState.lockObject, target: this.props.frame }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_color3LineComponent__WEBPACK_IMPORTED_MODULE_5__.Color3LineComponent, { lockObject: this.props.globalState.lockObject, label: "Color", target: this.props.frame, propertyName: "color" }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_4__.TextInputLineComponent, { lockObject: this.props.globalState.lockObject, label: "Comments", propertyName: "comments", target: this.props.frame }), !this.props.frame.isCollapsed && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_buttonLineComponent__WEBPACK_IMPORTED_MODULE_6__.ButtonLineComponent, { label: "Collapse", onClick: () => {
|
|
70932
71015
|
this.props.frame.isCollapsed = true;
|
|
70933
71016
|
} })), this.props.frame.isCollapsed && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_buttonLineComponent__WEBPACK_IMPORTED_MODULE_6__.ButtonLineComponent, { label: "Expand", onClick: () => {
|
|
70934
71017
|
this.props.frame.isCollapsed = false;
|
|
70935
71018
|
} })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_buttonLineComponent__WEBPACK_IMPORTED_MODULE_6__.ButtonLineComponent, { label: "Export", onClick: () => {
|
|
70936
71019
|
this.props.frame.export();
|
|
70937
|
-
} })] })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_propertyTab_inputsPropertyTabComponent__WEBPACK_IMPORTED_MODULE_3__.InputsPropertyTabComponent, { globalState: this.props.globalState, inputs: configurableInputBlocks })] })] })));
|
|
71020
|
+
} })] })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_propertyTab_inputsPropertyTabComponent__WEBPACK_IMPORTED_MODULE_3__.InputsPropertyTabComponent, { lockObject: this.props.globalState.lockObject, globalState: this.props.globalState, inputs: configurableInputBlocks })] })] })));
|
|
70938
71021
|
}
|
|
70939
71022
|
}
|
|
70940
71023
|
|
|
@@ -70957,15 +71040,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
70957
71040
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "../../../../node_modules/react/jsx-runtime.js");
|
|
70958
71041
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "../../../../node_modules/react/index.js");
|
|
70959
71042
|
/* harmony import */ var _sharedComponents_lineContainerComponent__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../sharedComponents/lineContainerComponent */ "../../../tools/nodeEditor/dist/sharedComponents/lineContainerComponent.js");
|
|
70960
|
-
/* harmony import */ var
|
|
70961
|
-
/* harmony import */ var
|
|
70962
|
-
/* harmony import */ var
|
|
70963
|
-
/* harmony import */ var
|
|
70964
|
-
/* harmony import */ var
|
|
70965
|
-
/* harmony import */ var
|
|
70966
|
-
/* harmony import */ var
|
|
70967
|
-
/* harmony import */ var
|
|
70968
|
-
/* harmony import */ var
|
|
71043
|
+
/* harmony import */ var _sharedComponents_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../sharedComponents/checkBoxLineComponent */ "../../../tools/nodeEditor/dist/sharedComponents/checkBoxLineComponent.js");
|
|
71044
|
+
/* harmony import */ var core_Materials_Node_nodeMaterialDecorator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! core/Materials/Node/Enums/nodeMaterialBlockTargets */ "core/Misc/dataStorage");
|
|
71045
|
+
/* harmony import */ var core_Materials_Node_nodeMaterialDecorator__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_Materials_Node_nodeMaterialDecorator__WEBPACK_IMPORTED_MODULE_4__);
|
|
71046
|
+
/* harmony import */ var shared_ui_components_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! shared-ui-components/lines/textInputLineComponent */ "../../../dev/sharedUiComponents/dist/lines/textInputLineComponent.js");
|
|
71047
|
+
/* harmony import */ var shared_ui_components_lines_vector2LineComponent__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! shared-ui-components/lines/vector2LineComponent */ "../../../dev/sharedUiComponents/dist/lines/vector2LineComponent.js");
|
|
71048
|
+
/* harmony import */ var shared_ui_components_lines_optionsLineComponent__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! shared-ui-components/lines/optionsLineComponent */ "../../../dev/sharedUiComponents/dist/lines/optionsLineComponent.js");
|
|
71049
|
+
/* harmony import */ var shared_ui_components_lines_textLineComponent__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! shared-ui-components/lines/textLineComponent */ "../../../dev/sharedUiComponents/dist/lines/textLineComponent.js");
|
|
71050
|
+
/* harmony import */ var shared_ui_components_lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! shared-ui-components/lines/floatLineComponent */ "../../../dev/sharedUiComponents/dist/lines/floatLineComponent.js");
|
|
71051
|
+
/* harmony import */ var shared_ui_components_lines_sliderLineComponent__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! shared-ui-components/lines/sliderLineComponent */ "../../../dev/sharedUiComponents/dist/lines/sliderLineComponent.js");
|
|
70969
71052
|
|
|
70970
71053
|
|
|
70971
71054
|
|
|
@@ -70992,22 +71075,22 @@ class GeneralPropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Com
|
|
|
70992
71075
|
}
|
|
70993
71076
|
render() {
|
|
70994
71077
|
const targetOptions = [
|
|
70995
|
-
{ label: "Neutral", value:
|
|
70996
|
-
{ label: "Vertex", value:
|
|
70997
|
-
{ label: "Fragment", value:
|
|
71078
|
+
{ label: "Neutral", value: core_Materials_Node_nodeMaterialDecorator__WEBPACK_IMPORTED_MODULE_4__.NodeMaterialBlockTargets.Neutral },
|
|
71079
|
+
{ label: "Vertex", value: core_Materials_Node_nodeMaterialDecorator__WEBPACK_IMPORTED_MODULE_4__.NodeMaterialBlockTargets.Vertex },
|
|
71080
|
+
{ label: "Fragment", value: core_Materials_Node_nodeMaterialDecorator__WEBPACK_IMPORTED_MODULE_4__.NodeMaterialBlockTargets.Fragment },
|
|
70998
71081
|
];
|
|
70999
71082
|
const block = this.props.nodeData.data;
|
|
71000
|
-
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_sharedComponents_lineContainerComponent__WEBPACK_IMPORTED_MODULE_2__.LineContainerComponent, Object.assign({ title: "GENERAL" }, { children: [(!block.isInput || !block.isAttribute) && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
71083
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_sharedComponents_lineContainerComponent__WEBPACK_IMPORTED_MODULE_2__.LineContainerComponent, Object.assign({ title: "GENERAL" }, { children: [(!block.isInput || !block.isAttribute) && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_5__.TextInputLineComponent, { label: "Name", propertyName: "name", target: block, lockObject: this.props.stateManager.lockObject, onChange: () => this.props.stateManager.onUpdateRequiredObservable.notifyObservers(block), validator: (newName) => {
|
|
71001
71084
|
if (!block.validateBlockName(newName)) {
|
|
71002
71085
|
this.props.stateManager.onErrorMessageDialogRequiredObservable.notifyObservers(`"${newName}" is a reserved name, please choose another`);
|
|
71003
71086
|
return false;
|
|
71004
71087
|
}
|
|
71005
71088
|
return true;
|
|
71006
|
-
} })), block._originalTargetIsNeutral && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
71089
|
+
} })), block._originalTargetIsNeutral && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_optionsLineComponent__WEBPACK_IMPORTED_MODULE_7__.OptionsLineComponent, { label: "Target", options: targetOptions, target: block, propertyName: "target", onSelect: () => {
|
|
71007
71090
|
this.forceUpdate();
|
|
71008
71091
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(block);
|
|
71009
71092
|
this.props.stateManager.onRebuildRequiredObservable.notifyObservers(true);
|
|
71010
|
-
} })), !block._originalTargetIsNeutral && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
71093
|
+
} })), !block._originalTargetIsNeutral && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_textLineComponent__WEBPACK_IMPORTED_MODULE_8__.TextLineComponent, { label: "Target", value: core_Materials_Node_nodeMaterialDecorator__WEBPACK_IMPORTED_MODULE_4__.NodeMaterialBlockTargets[block.target] }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_textLineComponent__WEBPACK_IMPORTED_MODULE_8__.TextLineComponent, { label: "Type", value: block.getClassName() }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_5__.TextInputLineComponent, { label: "Comments", propertyName: "comments", lockObject: this.props.stateManager.lockObject, target: block, onChange: () => this.props.stateManager.onUpdateRequiredObservable.notifyObservers(block) })] })) }));
|
|
71011
71094
|
}
|
|
71012
71095
|
}
|
|
71013
71096
|
class GenericPropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
|
|
@@ -71041,30 +71124,30 @@ class GenericPropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Com
|
|
|
71041
71124
|
groups.push(groupName);
|
|
71042
71125
|
}
|
|
71043
71126
|
switch (type) {
|
|
71044
|
-
case
|
|
71045
|
-
components.push((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
71127
|
+
case core_Materials_Node_nodeMaterialDecorator__WEBPACK_IMPORTED_MODULE_4__.PropertyTypeForEdition.Boolean: {
|
|
71128
|
+
components.push((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_sharedComponents_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_3__.CheckBoxLineComponent, { label: displayName, target: block, propertyName: propertyName, onValueChanged: () => this.forceRebuild(options.notifiers) }));
|
|
71046
71129
|
break;
|
|
71047
71130
|
}
|
|
71048
|
-
case
|
|
71131
|
+
case core_Materials_Node_nodeMaterialDecorator__WEBPACK_IMPORTED_MODULE_4__.PropertyTypeForEdition.Float: {
|
|
71049
71132
|
const cantDisplaySlider = isNaN(options.min) || isNaN(options.max) || options.min === options.max;
|
|
71050
71133
|
if (cantDisplaySlider) {
|
|
71051
|
-
components.push((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
71134
|
+
components.push((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_9__.FloatLineComponent, { label: displayName, propertyName: propertyName, target: block, onChange: () => this.forceRebuild(options.notifiers) }));
|
|
71052
71135
|
}
|
|
71053
71136
|
else {
|
|
71054
|
-
components.push((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
71137
|
+
components.push((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_sliderLineComponent__WEBPACK_IMPORTED_MODULE_10__.SliderLineComponent, { label: displayName, target: block, propertyName: propertyName, step: Math.abs(options.max - options.min) / 100.0, minimum: Math.min(options.min, options.max), maximum: options.max, onChange: () => this.forceRebuild(options.notifiers) }));
|
|
71055
71138
|
}
|
|
71056
71139
|
break;
|
|
71057
71140
|
}
|
|
71058
|
-
case
|
|
71059
|
-
components.push((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
71141
|
+
case core_Materials_Node_nodeMaterialDecorator__WEBPACK_IMPORTED_MODULE_4__.PropertyTypeForEdition.Int: {
|
|
71142
|
+
components.push((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_9__.FloatLineComponent, { digits: 0, step: "1", isInteger: true, label: displayName, propertyName: propertyName, target: block, onChange: () => this.forceRebuild(options.notifiers) }));
|
|
71060
71143
|
break;
|
|
71061
71144
|
}
|
|
71062
|
-
case
|
|
71063
|
-
components.push((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
71145
|
+
case core_Materials_Node_nodeMaterialDecorator__WEBPACK_IMPORTED_MODULE_4__.PropertyTypeForEdition.Vector2: {
|
|
71146
|
+
components.push((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_vector2LineComponent__WEBPACK_IMPORTED_MODULE_6__.Vector2LineComponent, { lockObject: this.props.stateManager.lockObject, label: displayName, propertyName: propertyName, target: block, onChange: () => this.forceRebuild(options.notifiers) }));
|
|
71064
71147
|
break;
|
|
71065
71148
|
}
|
|
71066
|
-
case
|
|
71067
|
-
components.push((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
71149
|
+
case core_Materials_Node_nodeMaterialDecorator__WEBPACK_IMPORTED_MODULE_4__.PropertyTypeForEdition.List: {
|
|
71150
|
+
components.push((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_optionsLineComponent__WEBPACK_IMPORTED_MODULE_7__.OptionsLineComponent, { label: displayName, options: options.options, target: block, propertyName: propertyName, onSelect: () => this.forceRebuild(options.notifiers) }));
|
|
71068
71151
|
break;
|
|
71069
71152
|
}
|
|
71070
71153
|
}
|
|
@@ -71219,9 +71302,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
71219
71302
|
/* harmony import */ var core_Maths_math_color__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core/Maths/math.color */ "core/Misc/dataStorage");
|
|
71220
71303
|
/* harmony import */ var core_Maths_math_color__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_Maths_math_color__WEBPACK_IMPORTED_MODULE_2__);
|
|
71221
71304
|
/* harmony import */ var _sharedComponents_colorPickerComponent__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../sharedComponents/colorPickerComponent */ "../../../tools/nodeEditor/dist/sharedComponents/colorPickerComponent.js");
|
|
71222
|
-
/* harmony import */ var
|
|
71223
|
-
/* harmony import */ var
|
|
71224
|
-
/* harmony import */ var
|
|
71305
|
+
/* harmony import */ var _imgs_delete_svg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../imgs/delete.svg */ "../../../tools/nodeEditor/dist/imgs/delete.svg");
|
|
71306
|
+
/* harmony import */ var _sharedComponents_copy_svg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../sharedComponents/copy.svg */ "../../../tools/nodeEditor/dist/sharedComponents/copy.svg");
|
|
71307
|
+
/* harmony import */ var shared_ui_components_lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! shared-ui-components/lines/floatLineComponent */ "../../../dev/sharedUiComponents/dist/lines/floatLineComponent.js");
|
|
71225
71308
|
|
|
71226
71309
|
|
|
71227
71310
|
|
|
@@ -71251,14 +71334,14 @@ class GradientStepComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component
|
|
|
71251
71334
|
const step = this.props.step;
|
|
71252
71335
|
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ className: "gradient-step" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "step" }, { children: `#${this.props.lineIndex}` })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "color" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_sharedComponents_colorPickerComponent__WEBPACK_IMPORTED_MODULE_3__.ColorPickerLineComponent, { value: step.color, globalState: this.props.stateManager.data, onColorChanged: (color) => {
|
|
71253
71336
|
this.updateColor(color);
|
|
71254
|
-
} }) })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "step-value" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
71337
|
+
} }) })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "step-value" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_6__.FloatLineComponent, { smallUI: true, label: "", target: step, propertyName: "step", min: 0, max: 1, onEnter: () => {
|
|
71255
71338
|
this.props.onUpdateStep();
|
|
71256
71339
|
this.props.onCheckForReOrder();
|
|
71257
71340
|
this.forceUpdate();
|
|
71258
71341
|
} }) })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "step-slider" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("input", { className: "range", type: "range", step: 0.01, min: 0, max: 1.0, value: step.step, onPointerUp: () => this.onPointerUp(), onChange: (evt) => this.updateStep(parseFloat(evt.target.value)) }) })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "gradient-copy", onClick: () => {
|
|
71259
71342
|
if (this.props.onCopy)
|
|
71260
71343
|
this.props.onCopy();
|
|
71261
|
-
}, title: "Copy Step" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("img", { className: "img", src:
|
|
71344
|
+
}, title: "Copy Step" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("img", { className: "img", src: _sharedComponents_copy_svg__WEBPACK_IMPORTED_MODULE_5__ }) })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "gradient-delete", onClick: () => this.props.onDelete(), title: "Delete Step" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("img", { className: "img", src: _imgs_delete_svg__WEBPACK_IMPORTED_MODULE_4__ }) }))] })));
|
|
71262
71345
|
}
|
|
71263
71346
|
}
|
|
71264
71347
|
|
|
@@ -71284,11 +71367,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
71284
71367
|
/* harmony import */ var _sharedComponents_lineContainerComponent__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../sharedComponents/lineContainerComponent */ "../../../tools/nodeEditor/dist/sharedComponents/lineContainerComponent.js");
|
|
71285
71368
|
/* harmony import */ var _sharedComponents_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../sharedComponents/checkBoxLineComponent */ "../../../tools/nodeEditor/dist/sharedComponents/checkBoxLineComponent.js");
|
|
71286
71369
|
/* harmony import */ var _genericNodePropertyComponent__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./genericNodePropertyComponent */ "../../../tools/nodeEditor/dist/graphSystem/properties/genericNodePropertyComponent.js");
|
|
71287
|
-
/* harmony import */ var
|
|
71288
|
-
/* harmony import */ var
|
|
71289
|
-
/* harmony import */ var
|
|
71290
|
-
/* harmony import */ var
|
|
71291
|
-
/* harmony import */ var
|
|
71370
|
+
/* harmony import */ var shared_ui_components_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! shared-ui-components/lines/textInputLineComponent */ "../../../dev/sharedUiComponents/dist/lines/textInputLineComponent.js");
|
|
71371
|
+
/* harmony import */ var shared_ui_components_lines_buttonLineComponent__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! shared-ui-components/lines/buttonLineComponent */ "../../../dev/sharedUiComponents/dist/lines/buttonLineComponent.js");
|
|
71372
|
+
/* 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");
|
|
71373
|
+
/* 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");
|
|
71374
|
+
/* 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");
|
|
71292
71375
|
|
|
71293
71376
|
|
|
71294
71377
|
|
|
@@ -71402,7 +71485,7 @@ class ImageSourcePropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__
|
|
|
71402
71485
|
{ label: "Linear/Nearest & linear mip", value: core_Misc_tools__WEBPACK_IMPORTED_MODULE_3__.Texture.LINEAR_NEAREST_MIPLINEAR },
|
|
71403
71486
|
{ label: "Linear/Nearest & nearest mip", value: core_Misc_tools__WEBPACK_IMPORTED_MODULE_3__.Texture.LINEAR_NEAREST_MIPNEAREST }, // 9
|
|
71404
71487
|
];
|
|
71405
|
-
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_6__.GeneralPropertyTabComponent, { stateManager: this.props.stateManager, nodeData: this.props.nodeData }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_sharedComponents_lineContainerComponent__WEBPACK_IMPORTED_MODULE_4__.LineContainerComponent, Object.assign({ title: "PROPERTIES" }, { children: [texture && texture.updateSamplingMode && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
71488
|
+
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_6__.GeneralPropertyTabComponent, { stateManager: this.props.stateManager, nodeData: this.props.nodeData }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_sharedComponents_lineContainerComponent__WEBPACK_IMPORTED_MODULE_4__.LineContainerComponent, Object.assign({ title: "PROPERTIES" }, { children: [texture && texture.updateSamplingMode && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_optionsLineComponent__WEBPACK_IMPORTED_MODULE_9__.OptionsLineComponent, { label: "Sampling", options: samplingMode, target: texture, noDirectUpdate: true, propertyName: "samplingMode", onSelect: (value) => {
|
|
71406
71489
|
texture.updateSamplingMode(value);
|
|
71407
71490
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(block);
|
|
71408
71491
|
} })), texture && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_sharedComponents_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_5__.CheckBoxLineComponent, { label: "Clamp U", isSelected: () => texture.wrapU === core_Misc_tools__WEBPACK_IMPORTED_MODULE_3__.Texture.CLAMP_ADDRESSMODE, onSelect: (value) => {
|
|
@@ -71411,25 +71494,25 @@ class ImageSourcePropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__
|
|
|
71411
71494
|
} })), texture && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_sharedComponents_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_5__.CheckBoxLineComponent, { label: "Clamp V", isSelected: () => texture.wrapV === core_Misc_tools__WEBPACK_IMPORTED_MODULE_3__.Texture.CLAMP_ADDRESSMODE, onSelect: (value) => {
|
|
71412
71495
|
texture.wrapV = value ? core_Misc_tools__WEBPACK_IMPORTED_MODULE_3__.Texture.CLAMP_ADDRESSMODE : core_Misc_tools__WEBPACK_IMPORTED_MODULE_3__.Texture.WRAP_ADDRESSMODE;
|
|
71413
71496
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(block);
|
|
71414
|
-
} })), texture && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
71497
|
+
} })), texture && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_10__.FloatLineComponent, { label: "Offset U", target: texture, propertyName: "uOffset", onChange: () => {
|
|
71415
71498
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(block);
|
|
71416
|
-
} })), texture && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
71499
|
+
} })), texture && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_10__.FloatLineComponent, { label: "Offset V", target: texture, propertyName: "vOffset", onChange: () => {
|
|
71417
71500
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(block);
|
|
71418
|
-
} })), texture && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
71501
|
+
} })), texture && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_10__.FloatLineComponent, { label: "Scale U", target: texture, propertyName: "uScale", onChange: () => {
|
|
71419
71502
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(block);
|
|
71420
|
-
} })), texture && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
71503
|
+
} })), texture && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_10__.FloatLineComponent, { label: "Scale V", target: texture, propertyName: "vScale", onChange: () => {
|
|
71421
71504
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(block);
|
|
71422
|
-
} })), texture && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
71505
|
+
} })), texture && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_sliderLineComponent__WEBPACK_IMPORTED_MODULE_11__.SliderLineComponent, { label: "Rotation U", target: texture, propertyName: "uAng", minimum: 0, maximum: Math.PI * 2, useEuler: true, step: 0.1, onChange: () => {
|
|
71423
71506
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(block);
|
|
71424
|
-
} })), texture && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
71507
|
+
} })), texture && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_sliderLineComponent__WEBPACK_IMPORTED_MODULE_11__.SliderLineComponent, { label: "Rotation V", target: texture, propertyName: "vAng", minimum: 0, maximum: Math.PI * 2, useEuler: true, step: 0.1, onChange: () => {
|
|
71425
71508
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(block);
|
|
71426
|
-
} })), texture && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
71509
|
+
} })), texture && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_sliderLineComponent__WEBPACK_IMPORTED_MODULE_11__.SliderLineComponent, { label: "Rotation W", target: texture, propertyName: "wAng", minimum: 0, maximum: Math.PI * 2, useEuler: true, step: 0.1, onChange: () => {
|
|
71427
71510
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(block);
|
|
71428
71511
|
} }))] })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_sharedComponents_lineContainerComponent__WEBPACK_IMPORTED_MODULE_4__.LineContainerComponent, Object.assign({ title: "SOURCE" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_sharedComponents_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_5__.CheckBoxLineComponent, { label: "Embed static texture", isSelected: () => this.state.isEmbedded, onSelect: (value) => {
|
|
71429
71512
|
this.setState({ isEmbedded: value });
|
|
71430
71513
|
this.imageSourceBlock.texture = null;
|
|
71431
71514
|
this.updateAfterTextureLoad();
|
|
71432
|
-
} }), this.state.isEmbedded && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_sharedComponents_fileButtonLineComponent__WEBPACK_IMPORTED_MODULE_2__.FileButtonLineComponent, { label: "Upload", onClick: (file) => this.replaceTexture(file), accept: ".jpg, .png, .tga, .dds, .env" }), !this.state.isEmbedded && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
71515
|
+
} }), this.state.isEmbedded && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_sharedComponents_fileButtonLineComponent__WEBPACK_IMPORTED_MODULE_2__.FileButtonLineComponent, { label: "Upload", onClick: (file) => this.replaceTexture(file), accept: ".jpg, .png, .tga, .dds, .env" }), !this.state.isEmbedded && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_7__.TextInputLineComponent, { lockObject: this.props.stateManager.lockObject, label: "Link", value: url, onChange: (newUrl) => this.replaceTextureWithUrl(newUrl) })), !this.state.isEmbedded && url && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_buttonLineComponent__WEBPACK_IMPORTED_MODULE_8__.ButtonLineComponent, { label: "Refresh", onClick: () => this.replaceTextureWithUrl(url + "?nocache=" + this._generateRandomForCache()) })), texture && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_buttonLineComponent__WEBPACK_IMPORTED_MODULE_8__.ButtonLineComponent, { label: "Remove", onClick: () => this.removeTexture() })] })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_genericNodePropertyComponent__WEBPACK_IMPORTED_MODULE_6__.GenericPropertyTabComponent, { stateManager: this.props.stateManager, nodeData: this.props.nodeData })] }));
|
|
71433
71516
|
}
|
|
71434
71517
|
}
|
|
71435
71518
|
|
|
@@ -71449,22 +71532,22 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
71449
71532
|
/* harmony export */ });
|
|
71450
71533
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "../../../../node_modules/react/jsx-runtime.js");
|
|
71451
71534
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "../../../../node_modules/react/index.js");
|
|
71452
|
-
/* harmony import */ var
|
|
71453
|
-
/* harmony import */ var
|
|
71454
|
-
/* harmony import */ var
|
|
71455
|
-
/* harmony import */ var
|
|
71456
|
-
/* harmony import */ var
|
|
71457
|
-
/* harmony import */ var
|
|
71458
|
-
/* harmony import */ var
|
|
71459
|
-
/* harmony import */ var
|
|
71460
|
-
/* harmony import */ var
|
|
71461
|
-
/* harmony import */ var
|
|
71462
|
-
/* harmony import */ var
|
|
71463
|
-
/* harmony import */ var
|
|
71464
|
-
/* harmony import */ var
|
|
71465
|
-
/* harmony import */ var
|
|
71466
|
-
/* harmony import */ var
|
|
71467
|
-
/* harmony import */ var
|
|
71535
|
+
/* harmony import */ var _components_propertyTab_properties_floatPropertyTabComponent__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../components/propertyTab/properties/floatPropertyTabComponent */ "../../../tools/nodeEditor/dist/components/propertyTab/properties/floatPropertyTabComponent.js");
|
|
71536
|
+
/* harmony import */ var _components_propertyTab_properties_vector2PropertyTabComponent__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../components/propertyTab/properties/vector2PropertyTabComponent */ "../../../tools/nodeEditor/dist/components/propertyTab/properties/vector2PropertyTabComponent.js");
|
|
71537
|
+
/* harmony import */ var _components_propertyTab_properties_color3PropertyTabComponent__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../components/propertyTab/properties/color3PropertyTabComponent */ "../../../tools/nodeEditor/dist/components/propertyTab/properties/color3PropertyTabComponent.js");
|
|
71538
|
+
/* harmony import */ var _components_propertyTab_properties_vector3PropertyTabComponent__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../components/propertyTab/properties/vector3PropertyTabComponent */ "../../../tools/nodeEditor/dist/components/propertyTab/properties/vector3PropertyTabComponent.js");
|
|
71539
|
+
/* harmony import */ var _components_propertyTab_properties_vector4PropertyTabComponent__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../components/propertyTab/properties/vector4PropertyTabComponent */ "../../../tools/nodeEditor/dist/components/propertyTab/properties/vector4PropertyTabComponent.js");
|
|
71540
|
+
/* harmony import */ var _components_propertyTab_properties_matrixPropertyTabComponent__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../components/propertyTab/properties/matrixPropertyTabComponent */ "../../../tools/nodeEditor/dist/components/propertyTab/properties/matrixPropertyTabComponent.js");
|
|
71541
|
+
/* harmony import */ var _sharedComponents_lineContainerComponent__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../sharedComponents/lineContainerComponent */ "../../../tools/nodeEditor/dist/sharedComponents/lineContainerComponent.js");
|
|
71542
|
+
/* harmony import */ var core_Materials_Node_Enums_nodeMaterialBlockConnectionPointTypes__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! core/Materials/Node/Blocks/Input/animatedInputBlockTypes */ "core/Misc/dataStorage");
|
|
71543
|
+
/* harmony import */ var core_Materials_Node_Enums_nodeMaterialBlockConnectionPointTypes__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(core_Materials_Node_Enums_nodeMaterialBlockConnectionPointTypes__WEBPACK_IMPORTED_MODULE_9__);
|
|
71544
|
+
/* harmony import */ var _genericNodePropertyComponent__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./genericNodePropertyComponent */ "../../../tools/nodeEditor/dist/graphSystem/properties/genericNodePropertyComponent.js");
|
|
71545
|
+
/* harmony import */ var _sharedComponents_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../sharedComponents/checkBoxLineComponent */ "../../../tools/nodeEditor/dist/sharedComponents/checkBoxLineComponent.js");
|
|
71546
|
+
/* harmony import */ var _components_propertyTab_properties_color4PropertyTabComponent__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/propertyTab/properties/color4PropertyTabComponent */ "../../../tools/nodeEditor/dist/components/propertyTab/properties/color4PropertyTabComponent.js");
|
|
71547
|
+
/* harmony import */ var shared_ui_components_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! shared-ui-components/lines/textInputLineComponent */ "../../../dev/sharedUiComponents/dist/lines/textInputLineComponent.js");
|
|
71548
|
+
/* harmony import */ var shared_ui_components_lines_optionsLineComponent__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! shared-ui-components/lines/optionsLineComponent */ "../../../dev/sharedUiComponents/dist/lines/optionsLineComponent.js");
|
|
71549
|
+
/* harmony import */ var shared_ui_components_lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! shared-ui-components/lines/floatLineComponent */ "../../../dev/sharedUiComponents/dist/lines/floatLineComponent.js");
|
|
71550
|
+
/* harmony import */ var shared_ui_components_lines_sliderLineComponent__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! shared-ui-components/lines/sliderLineComponent */ "../../../dev/sharedUiComponents/dist/lines/sliderLineComponent.js");
|
|
71468
71551
|
|
|
71469
71552
|
|
|
71470
71553
|
|
|
@@ -71505,9 +71588,9 @@ class InputPropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Compo
|
|
|
71505
71588
|
renderValue(globalState) {
|
|
71506
71589
|
const inputBlock = this.props.nodeData.data;
|
|
71507
71590
|
switch (inputBlock.type) {
|
|
71508
|
-
case
|
|
71591
|
+
case core_Materials_Node_Enums_nodeMaterialBlockConnectionPointTypes__WEBPACK_IMPORTED_MODULE_9__.NodeMaterialBlockConnectionPointTypes.Float: {
|
|
71509
71592
|
const cantDisplaySlider = isNaN(inputBlock.min) || isNaN(inputBlock.max) || inputBlock.min === inputBlock.max;
|
|
71510
|
-
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)(
|
|
71593
|
+
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)(_sharedComponents_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_11__.CheckBoxLineComponent, { label: "Is boolean", target: inputBlock, propertyName: "isBoolean" }), inputBlock.isBoolean && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_sharedComponents_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_11__.CheckBoxLineComponent, { label: "Value", isSelected: () => {
|
|
71511
71594
|
return inputBlock.value === 1;
|
|
71512
71595
|
}, onSelect: (value) => {
|
|
71513
71596
|
inputBlock.value = value ? 1 : 0;
|
|
@@ -71515,7 +71598,7 @@ class InputPropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Compo
|
|
|
71515
71598
|
this.props.stateManager.onRebuildRequiredObservable.notifyObservers(true);
|
|
71516
71599
|
}
|
|
71517
71600
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(inputBlock);
|
|
71518
|
-
} })), !inputBlock.isBoolean && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
71601
|
+
} })), !inputBlock.isBoolean && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_15__.FloatLineComponent, { label: "Min", target: inputBlock, propertyName: "min", onChange: () => {
|
|
71519
71602
|
if (inputBlock.value < inputBlock.min) {
|
|
71520
71603
|
inputBlock.value = inputBlock.min;
|
|
71521
71604
|
if (inputBlock.isConstant) {
|
|
@@ -71523,7 +71606,7 @@ class InputPropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Compo
|
|
|
71523
71606
|
}
|
|
71524
71607
|
}
|
|
71525
71608
|
this.forceUpdate();
|
|
71526
|
-
} })), !inputBlock.isBoolean && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
71609
|
+
} })), !inputBlock.isBoolean && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_15__.FloatLineComponent, { label: "Max", target: inputBlock, propertyName: "max", onChange: () => {
|
|
71527
71610
|
if (inputBlock.value > inputBlock.max) {
|
|
71528
71611
|
inputBlock.value = inputBlock.max;
|
|
71529
71612
|
if (inputBlock.isConstant) {
|
|
@@ -71531,33 +71614,33 @@ class InputPropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Compo
|
|
|
71531
71614
|
}
|
|
71532
71615
|
}
|
|
71533
71616
|
this.forceUpdate();
|
|
71534
|
-
} })), !inputBlock.isBoolean && cantDisplaySlider && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
71617
|
+
} })), !inputBlock.isBoolean && cantDisplaySlider && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_propertyTab_properties_floatPropertyTabComponent__WEBPACK_IMPORTED_MODULE_2__.FloatPropertyTabComponent, { globalState: globalState, inputBlock: inputBlock }), !inputBlock.isBoolean && !cantDisplaySlider && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_sliderLineComponent__WEBPACK_IMPORTED_MODULE_16__.SliderLineComponent, { label: "Value", target: inputBlock, propertyName: "value", step: Math.abs(inputBlock.max - inputBlock.min) / 100.0, minimum: Math.min(inputBlock.min, inputBlock.max), maximum: inputBlock.max, onChange: () => {
|
|
71535
71618
|
if (inputBlock.isConstant) {
|
|
71536
71619
|
this.props.stateManager.onRebuildRequiredObservable.notifyObservers(true);
|
|
71537
71620
|
}
|
|
71538
71621
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(inputBlock);
|
|
71539
71622
|
} }))] }));
|
|
71540
71623
|
}
|
|
71541
|
-
case
|
|
71542
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
71543
|
-
case
|
|
71544
|
-
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)(
|
|
71624
|
+
case core_Materials_Node_Enums_nodeMaterialBlockConnectionPointTypes__WEBPACK_IMPORTED_MODULE_9__.NodeMaterialBlockConnectionPointTypes.Vector2:
|
|
71625
|
+
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 });
|
|
71626
|
+
case core_Materials_Node_Enums_nodeMaterialBlockConnectionPointTypes__WEBPACK_IMPORTED_MODULE_9__.NodeMaterialBlockConnectionPointTypes.Color3:
|
|
71627
|
+
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)(_components_propertyTab_properties_color3PropertyTabComponent__WEBPACK_IMPORTED_MODULE_4__.Color3PropertyTabComponent, { lockObject: globalState.lockObject, globalState: globalState, inputBlock: inputBlock }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_sharedComponents_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_11__.CheckBoxLineComponent, { label: "Convert to gamma space", propertyName: "convertToGammaSpace", target: inputBlock, onValueChanged: () => {
|
|
71545
71628
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(inputBlock);
|
|
71546
|
-
} }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
71629
|
+
} }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_sharedComponents_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_11__.CheckBoxLineComponent, { label: "Convert to linear space", propertyName: "convertToLinearSpace", target: inputBlock, onValueChanged: () => {
|
|
71547
71630
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(inputBlock);
|
|
71548
71631
|
} })] }));
|
|
71549
|
-
case
|
|
71550
|
-
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)(
|
|
71632
|
+
case core_Materials_Node_Enums_nodeMaterialBlockConnectionPointTypes__WEBPACK_IMPORTED_MODULE_9__.NodeMaterialBlockConnectionPointTypes.Color4:
|
|
71633
|
+
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)(_components_propertyTab_properties_color4PropertyTabComponent__WEBPACK_IMPORTED_MODULE_12__.Color4PropertyTabComponent, { lockObject: globalState.lockObject, globalState: globalState, inputBlock: inputBlock }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_sharedComponents_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_11__.CheckBoxLineComponent, { label: "Convert to gamma space", propertyName: "convertToGammaSpace", target: inputBlock, onValueChanged: () => {
|
|
71551
71634
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(inputBlock);
|
|
71552
|
-
} }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
71635
|
+
} }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_sharedComponents_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_11__.CheckBoxLineComponent, { label: "Convert to linear space", propertyName: "convertToLinearSpace", target: inputBlock, onValueChanged: () => {
|
|
71553
71636
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(inputBlock);
|
|
71554
71637
|
} })] }));
|
|
71555
|
-
case
|
|
71556
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
71557
|
-
case
|
|
71558
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
71559
|
-
case
|
|
71560
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
71638
|
+
case core_Materials_Node_Enums_nodeMaterialBlockConnectionPointTypes__WEBPACK_IMPORTED_MODULE_9__.NodeMaterialBlockConnectionPointTypes.Vector3:
|
|
71639
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_propertyTab_properties_vector3PropertyTabComponent__WEBPACK_IMPORTED_MODULE_5__.Vector3PropertyTabComponent, { lockObject: globalState.lockObject, globalState: globalState, inputBlock: inputBlock });
|
|
71640
|
+
case core_Materials_Node_Enums_nodeMaterialBlockConnectionPointTypes__WEBPACK_IMPORTED_MODULE_9__.NodeMaterialBlockConnectionPointTypes.Vector4:
|
|
71641
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_propertyTab_properties_vector4PropertyTabComponent__WEBPACK_IMPORTED_MODULE_6__.Vector4PropertyTabComponent, { lockObject: globalState.lockObject, globalState: globalState, inputBlock: inputBlock });
|
|
71642
|
+
case core_Materials_Node_Enums_nodeMaterialBlockConnectionPointTypes__WEBPACK_IMPORTED_MODULE_9__.NodeMaterialBlockConnectionPointTypes.Matrix:
|
|
71643
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_propertyTab_properties_matrixPropertyTabComponent__WEBPACK_IMPORTED_MODULE_7__.MatrixPropertyTabComponent, { lockObject: globalState.lockObject, globalState: globalState, inputBlock: inputBlock });
|
|
71561
71644
|
}
|
|
71562
71645
|
return null;
|
|
71563
71646
|
}
|
|
@@ -71571,36 +71654,36 @@ class InputPropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Compo
|
|
|
71571
71654
|
let attributeOptions = [];
|
|
71572
71655
|
let animationOptions = [];
|
|
71573
71656
|
switch (inputBlock.type) {
|
|
71574
|
-
case
|
|
71657
|
+
case core_Materials_Node_Enums_nodeMaterialBlockConnectionPointTypes__WEBPACK_IMPORTED_MODULE_9__.NodeMaterialBlockConnectionPointTypes.Float:
|
|
71575
71658
|
animationOptions = [
|
|
71576
|
-
{ label: "None", value:
|
|
71577
|
-
{ label: "Time", value:
|
|
71659
|
+
{ label: "None", value: core_Materials_Node_Enums_nodeMaterialBlockConnectionPointTypes__WEBPACK_IMPORTED_MODULE_9__.AnimatedInputBlockTypes.None },
|
|
71660
|
+
{ label: "Time", value: core_Materials_Node_Enums_nodeMaterialBlockConnectionPointTypes__WEBPACK_IMPORTED_MODULE_9__.AnimatedInputBlockTypes.Time },
|
|
71578
71661
|
];
|
|
71579
71662
|
systemValuesOptions = [
|
|
71580
|
-
{ label: "Delta time", value:
|
|
71581
|
-
{ label: "Material alpha", value:
|
|
71663
|
+
{ label: "Delta time", value: core_Materials_Node_Enums_nodeMaterialBlockConnectionPointTypes__WEBPACK_IMPORTED_MODULE_9__.NodeMaterialSystemValues.DeltaTime },
|
|
71664
|
+
{ label: "Material alpha", value: core_Materials_Node_Enums_nodeMaterialBlockConnectionPointTypes__WEBPACK_IMPORTED_MODULE_9__.NodeMaterialSystemValues.MaterialAlpha },
|
|
71582
71665
|
];
|
|
71583
71666
|
break;
|
|
71584
|
-
case
|
|
71667
|
+
case core_Materials_Node_Enums_nodeMaterialBlockConnectionPointTypes__WEBPACK_IMPORTED_MODULE_9__.NodeMaterialBlockConnectionPointTypes.Matrix:
|
|
71585
71668
|
systemValuesOptions = [
|
|
71586
|
-
{ label: "World", value:
|
|
71587
|
-
{ label: "World x View", value:
|
|
71588
|
-
{ label: "World x View x Projection", value:
|
|
71589
|
-
{ label: "View", value:
|
|
71590
|
-
{ label: "View x Projection", value:
|
|
71591
|
-
{ label: "Projection", value:
|
|
71669
|
+
{ label: "World", value: core_Materials_Node_Enums_nodeMaterialBlockConnectionPointTypes__WEBPACK_IMPORTED_MODULE_9__.NodeMaterialSystemValues.World },
|
|
71670
|
+
{ label: "World x View", value: core_Materials_Node_Enums_nodeMaterialBlockConnectionPointTypes__WEBPACK_IMPORTED_MODULE_9__.NodeMaterialSystemValues.WorldView },
|
|
71671
|
+
{ label: "World x View x Projection", value: core_Materials_Node_Enums_nodeMaterialBlockConnectionPointTypes__WEBPACK_IMPORTED_MODULE_9__.NodeMaterialSystemValues.WorldViewProjection },
|
|
71672
|
+
{ label: "View", value: core_Materials_Node_Enums_nodeMaterialBlockConnectionPointTypes__WEBPACK_IMPORTED_MODULE_9__.NodeMaterialSystemValues.View },
|
|
71673
|
+
{ label: "View x Projection", value: core_Materials_Node_Enums_nodeMaterialBlockConnectionPointTypes__WEBPACK_IMPORTED_MODULE_9__.NodeMaterialSystemValues.ViewProjection },
|
|
71674
|
+
{ label: "Projection", value: core_Materials_Node_Enums_nodeMaterialBlockConnectionPointTypes__WEBPACK_IMPORTED_MODULE_9__.NodeMaterialSystemValues.Projection },
|
|
71592
71675
|
];
|
|
71593
71676
|
break;
|
|
71594
|
-
case
|
|
71595
|
-
systemValuesOptions = [{ label: "Fog color", value:
|
|
71677
|
+
case core_Materials_Node_Enums_nodeMaterialBlockConnectionPointTypes__WEBPACK_IMPORTED_MODULE_9__.NodeMaterialBlockConnectionPointTypes.Color3:
|
|
71678
|
+
systemValuesOptions = [{ label: "Fog color", value: core_Materials_Node_Enums_nodeMaterialBlockConnectionPointTypes__WEBPACK_IMPORTED_MODULE_9__.NodeMaterialSystemValues.FogColor }];
|
|
71596
71679
|
break;
|
|
71597
|
-
case
|
|
71680
|
+
case core_Materials_Node_Enums_nodeMaterialBlockConnectionPointTypes__WEBPACK_IMPORTED_MODULE_9__.NodeMaterialBlockConnectionPointTypes.Color4:
|
|
71598
71681
|
attributeOptions = [
|
|
71599
71682
|
{ label: "color", value: "color" },
|
|
71600
71683
|
{ label: "Instance Color", value: "instanceColor" },
|
|
71601
71684
|
];
|
|
71602
71685
|
break;
|
|
71603
|
-
case
|
|
71686
|
+
case core_Materials_Node_Enums_nodeMaterialBlockConnectionPointTypes__WEBPACK_IMPORTED_MODULE_9__.NodeMaterialBlockConnectionPointTypes.Vector2:
|
|
71604
71687
|
attributeOptions = [
|
|
71605
71688
|
{ label: "uv", value: "uv" },
|
|
71606
71689
|
{ label: "uv2", value: "uv2" },
|
|
@@ -71610,20 +71693,20 @@ class InputPropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Compo
|
|
|
71610
71693
|
{ label: "uv6", value: "uv6" },
|
|
71611
71694
|
];
|
|
71612
71695
|
break;
|
|
71613
|
-
case
|
|
71614
|
-
systemValuesOptions = [{ label: "Camera position", value:
|
|
71696
|
+
case core_Materials_Node_Enums_nodeMaterialBlockConnectionPointTypes__WEBPACK_IMPORTED_MODULE_9__.NodeMaterialBlockConnectionPointTypes.Vector3:
|
|
71697
|
+
systemValuesOptions = [{ label: "Camera position", value: core_Materials_Node_Enums_nodeMaterialBlockConnectionPointTypes__WEBPACK_IMPORTED_MODULE_9__.NodeMaterialSystemValues.CameraPosition }];
|
|
71615
71698
|
attributeOptions = [
|
|
71616
71699
|
{ label: "position", value: "position" },
|
|
71617
71700
|
{ label: "normal", value: "normal" },
|
|
71618
71701
|
];
|
|
71619
71702
|
break;
|
|
71620
|
-
case
|
|
71703
|
+
case core_Materials_Node_Enums_nodeMaterialBlockConnectionPointTypes__WEBPACK_IMPORTED_MODULE_9__.NodeMaterialBlockConnectionPointTypes.Vector4:
|
|
71621
71704
|
attributeOptions = [
|
|
71622
71705
|
{ label: "matricesIndices", value: "matricesIndices" },
|
|
71623
71706
|
{ label: "matricesWeights", value: "matricesWeights" },
|
|
71624
71707
|
{ label: "tangent", value: "tangent" },
|
|
71625
71708
|
];
|
|
71626
|
-
systemValuesOptions = [{ label: "Camera parameters", value:
|
|
71709
|
+
systemValuesOptions = [{ label: "Camera parameters", value: core_Materials_Node_Enums_nodeMaterialBlockConnectionPointTypes__WEBPACK_IMPORTED_MODULE_9__.NodeMaterialSystemValues.CameraParameters }];
|
|
71627
71710
|
break;
|
|
71628
71711
|
}
|
|
71629
71712
|
const modeOptions = [{ label: "User-defined", value: 0 }];
|
|
@@ -71638,7 +71721,7 @@ class InputPropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Compo
|
|
|
71638
71721
|
{ label: "Visible in the inspector", value: 1 },
|
|
71639
71722
|
{ label: "Constant", value: 2 },
|
|
71640
71723
|
];
|
|
71641
|
-
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
71724
|
+
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_10__.GeneralPropertyTabComponent, { stateManager: this.props.stateManager, nodeData: this.props.nodeData }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_sharedComponents_lineContainerComponent__WEBPACK_IMPORTED_MODULE_8__.LineContainerComponent, Object.assign({ title: "PROPERTIES" }, { children: [inputBlock.isUniform && !inputBlock.isSystemValue && inputBlock.animationType === core_Materials_Node_Enums_nodeMaterialBlockConnectionPointTypes__WEBPACK_IMPORTED_MODULE_9__.AnimatedInputBlockTypes.None && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_optionsLineComponent__WEBPACK_IMPORTED_MODULE_14__.OptionsLineComponent, { label: "Type", options: typeOptions, target: inputBlock, noDirectUpdate: true, extractValue: (block) => {
|
|
71642
71725
|
if (block.visibleInInspector) {
|
|
71643
71726
|
return 1;
|
|
71644
71727
|
}
|
|
@@ -71664,11 +71747,11 @@ class InputPropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Compo
|
|
|
71664
71747
|
this.forceUpdate();
|
|
71665
71748
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(inputBlock);
|
|
71666
71749
|
this.props.stateManager.onRebuildRequiredObservable.notifyObservers(true);
|
|
71667
|
-
}, propertyName: "" })), inputBlock.visibleInInspector && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
71750
|
+
}, propertyName: "" })), inputBlock.visibleInInspector && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_13__.TextInputLineComponent, { label: "Group", propertyName: "groupInInspector", target: inputBlock, lockObject: this.props.stateManager.lockObject, onChange: () => {
|
|
71668
71751
|
this.forceUpdate();
|
|
71669
71752
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(inputBlock);
|
|
71670
71753
|
this.props.stateManager.onRebuildRequiredObservable.notifyObservers(true);
|
|
71671
|
-
} })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
71754
|
+
} })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_optionsLineComponent__WEBPACK_IMPORTED_MODULE_14__.OptionsLineComponent, { label: "Mode", options: modeOptions, target: inputBlock, noDirectUpdate: true, extractValue: (block) => {
|
|
71672
71755
|
if (block.isAttribute) {
|
|
71673
71756
|
return 1;
|
|
71674
71757
|
}
|
|
@@ -71693,24 +71776,24 @@ class InputPropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Compo
|
|
|
71693
71776
|
this.forceUpdate();
|
|
71694
71777
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(inputBlock);
|
|
71695
71778
|
this.props.stateManager.onRebuildRequiredObservable.notifyObservers(true);
|
|
71696
|
-
}, propertyName: "" }), inputBlock.isAttribute && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
71779
|
+
}, propertyName: "" }), inputBlock.isAttribute && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_optionsLineComponent__WEBPACK_IMPORTED_MODULE_14__.OptionsLineComponent, { label: "Attribute", valuesAreStrings: true, options: attributeOptions, target: inputBlock, propertyName: "name", onSelect: (value) => {
|
|
71697
71780
|
inputBlock.setAsAttribute(value);
|
|
71698
71781
|
this.forceUpdate();
|
|
71699
71782
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(inputBlock);
|
|
71700
71783
|
this.props.stateManager.onRebuildRequiredObservable.notifyObservers(true);
|
|
71701
|
-
} })), inputBlock.isUniform && animationOptions.length > 0 && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
71784
|
+
} })), inputBlock.isUniform && animationOptions.length > 0 && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_optionsLineComponent__WEBPACK_IMPORTED_MODULE_14__.OptionsLineComponent, { label: "Animation type", options: animationOptions, target: inputBlock, propertyName: "animationType", onSelect: () => {
|
|
71702
71785
|
this.forceUpdate();
|
|
71703
71786
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(inputBlock);
|
|
71704
71787
|
this.props.stateManager.onRebuildRequiredObservable.notifyObservers(true);
|
|
71705
71788
|
} })), inputBlock.isUniform &&
|
|
71706
71789
|
!inputBlock.isSystemValue &&
|
|
71707
|
-
inputBlock.animationType ===
|
|
71708
|
-
this.renderValue(this.props.stateManager.data), inputBlock.isUniform && inputBlock.isSystemValue && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
71790
|
+
inputBlock.animationType === core_Materials_Node_Enums_nodeMaterialBlockConnectionPointTypes__WEBPACK_IMPORTED_MODULE_9__.AnimatedInputBlockTypes.None &&
|
|
71791
|
+
this.renderValue(this.props.stateManager.data), inputBlock.isUniform && inputBlock.isSystemValue && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_optionsLineComponent__WEBPACK_IMPORTED_MODULE_14__.OptionsLineComponent, { label: "System value", options: systemValuesOptions, target: inputBlock, propertyName: "systemValue", onSelect: (value) => {
|
|
71709
71792
|
inputBlock.setAsSystemValue(value);
|
|
71710
71793
|
this.forceUpdate();
|
|
71711
71794
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(inputBlock);
|
|
71712
71795
|
this.props.stateManager.onRebuildRequiredObservable.notifyObservers(true);
|
|
71713
|
-
} })), inputBlock.isUniform && !inputBlock.isSystemValue && inputBlock.animationType ===
|
|
71796
|
+
} })), inputBlock.isUniform && !inputBlock.isSystemValue && inputBlock.animationType === core_Materials_Node_Enums_nodeMaterialBlockConnectionPointTypes__WEBPACK_IMPORTED_MODULE_9__.AnimatedInputBlockTypes.None && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_sharedComponents_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_11__.CheckBoxLineComponent, { label: "Visible on frame", target: inputBlock, propertyName: "visibleOnFrame" }))] }))] }));
|
|
71714
71797
|
}
|
|
71715
71798
|
}
|
|
71716
71799
|
|
|
@@ -71816,8 +71899,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
71816
71899
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "../../../../node_modules/react/index.js");
|
|
71817
71900
|
/* harmony import */ var _sharedComponents_lineContainerComponent__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../sharedComponents/lineContainerComponent */ "../../../tools/nodeEditor/dist/sharedComponents/lineContainerComponent.js");
|
|
71818
71901
|
/* harmony import */ var _sharedComponents_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../sharedComponents/checkBoxLineComponent */ "../../../tools/nodeEditor/dist/sharedComponents/checkBoxLineComponent.js");
|
|
71819
|
-
/* harmony import */ var
|
|
71820
|
-
/* harmony import */ var
|
|
71902
|
+
/* harmony import */ var shared_ui_components_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! shared-ui-components/lines/textInputLineComponent */ "../../../dev/sharedUiComponents/dist/lines/textInputLineComponent.js");
|
|
71903
|
+
/* harmony import */ var shared_ui_components_lines_textLineComponent__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! shared-ui-components/lines/textLineComponent */ "../../../dev/sharedUiComponents/dist/lines/textLineComponent.js");
|
|
71821
71904
|
|
|
71822
71905
|
|
|
71823
71906
|
|
|
@@ -71836,7 +71919,7 @@ class NodePortPropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Co
|
|
|
71836
71919
|
this.props.stateManager.onExposePortOnFrameObservable.notifyObservers(this.props.nodePort.node);
|
|
71837
71920
|
}
|
|
71838
71921
|
render() {
|
|
71839
|
-
const info = this.props.nodePort.hasLabel() ? ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { children: [this.props.nodePort.hasLabel() && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
71922
|
+
const info = this.props.nodePort.hasLabel() ? ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { children: [this.props.nodePort.hasLabel() && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_4__.TextInputLineComponent, { lockObject: this.props.stateManager.lockObject, label: "Port Label", propertyName: "portName", target: this.props.nodePort })), this.props.nodePort.node.enclosingFrameId !== -1 && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_sharedComponents_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_3__.CheckBoxLineComponent, { label: "Expose Port on Frame", target: this.props.nodePort, isSelected: () => this.props.nodePort.exposedOnFrame, onSelect: (value) => this.toggleExposeOnFrame(value), propertyName: "exposedOnFrame", disabled: this.props.nodePort.disabled }))] })) : ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_textLineComponent__WEBPACK_IMPORTED_MODULE_5__.TextLineComponent, { label: "This node is a constant input node and cannot be exposed to the frame.", value: " " }));
|
|
71840
71923
|
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ id: "propertyTab" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ id: "header" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("img", { id: "logo", src: "https://www.babylonjs.com/Assets/logo-babylonjs-social-twitter.png" }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ id: "title" }, { children: "NODE MATERIAL EDITOR" }))] })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_sharedComponents_lineContainerComponent__WEBPACK_IMPORTED_MODULE_2__.LineContainerComponent, Object.assign({ title: "GENERAL" }, { children: info })) })] })));
|
|
71841
71924
|
}
|
|
71842
71925
|
}
|
|
@@ -71862,12 +71945,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
71862
71945
|
/* harmony import */ var core_Misc_tools__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_Misc_tools__WEBPACK_IMPORTED_MODULE_3__);
|
|
71863
71946
|
/* harmony import */ var _sharedComponents_lineContainerComponent__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../sharedComponents/lineContainerComponent */ "../../../tools/nodeEditor/dist/sharedComponents/lineContainerComponent.js");
|
|
71864
71947
|
/* harmony import */ var _sharedComponents_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../sharedComponents/checkBoxLineComponent */ "../../../tools/nodeEditor/dist/sharedComponents/checkBoxLineComponent.js");
|
|
71865
|
-
/* harmony import */ var
|
|
71866
|
-
/* harmony import */ var
|
|
71867
|
-
/* harmony import */ var
|
|
71868
|
-
/* harmony import */ var
|
|
71869
|
-
/* harmony import */ var
|
|
71870
|
-
/* harmony import */ var
|
|
71948
|
+
/* harmony import */ var _genericNodePropertyComponent__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./genericNodePropertyComponent */ "../../../tools/nodeEditor/dist/graphSystem/properties/genericNodePropertyComponent.js");
|
|
71949
|
+
/* harmony import */ var shared_ui_components_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! shared-ui-components/lines/textInputLineComponent */ "../../../dev/sharedUiComponents/dist/lines/textInputLineComponent.js");
|
|
71950
|
+
/* harmony import */ var shared_ui_components_lines_buttonLineComponent__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! shared-ui-components/lines/buttonLineComponent */ "../../../dev/sharedUiComponents/dist/lines/buttonLineComponent.js");
|
|
71951
|
+
/* 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");
|
|
71952
|
+
/* 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");
|
|
71953
|
+
/* 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");
|
|
71871
71954
|
|
|
71872
71955
|
|
|
71873
71956
|
|
|
@@ -72060,7 +72143,7 @@ class TexturePropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Com
|
|
|
72060
72143
|
{ label: "Linear/Nearest & linear mip", value: core_Misc_tools__WEBPACK_IMPORTED_MODULE_3__.Texture.LINEAR_NEAREST_MIPLINEAR },
|
|
72061
72144
|
{ label: "Linear/Nearest & nearest mip", value: core_Misc_tools__WEBPACK_IMPORTED_MODULE_3__.Texture.LINEAR_NEAREST_MIPNEAREST }, // 9
|
|
72062
72145
|
];
|
|
72063
|
-
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
72146
|
+
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_6__.GeneralPropertyTabComponent, { stateManager: this.props.stateManager, nodeData: this.props.nodeData }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_sharedComponents_lineContainerComponent__WEBPACK_IMPORTED_MODULE_4__.LineContainerComponent, Object.assign({ title: "PROPERTIES" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_sharedComponents_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_5__.CheckBoxLineComponent, { label: "Auto select UV", propertyName: "autoSelectUV", target: block, onValueChanged: () => {
|
|
72064
72147
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(block);
|
|
72065
72148
|
} }), !isInReflectionMode && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_sharedComponents_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_5__.CheckBoxLineComponent, { label: "Convert to gamma space", propertyName: "convertToGammaSpace", target: block, onValueChanged: () => {
|
|
72066
72149
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(block);
|
|
@@ -72071,10 +72154,10 @@ class TexturePropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Com
|
|
|
72071
72154
|
} })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_sharedComponents_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_5__.CheckBoxLineComponent, { label: "Disable multiplying by level", propertyName: "disableLevelMultiplication", target: block, onValueChanged: () => {
|
|
72072
72155
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(block);
|
|
72073
72156
|
this.props.stateManager.onRebuildRequiredObservable.notifyObservers(true);
|
|
72074
|
-
} }), texture && texture.updateSamplingMode && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
72157
|
+
} }), texture && texture.updateSamplingMode && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_optionsLineComponent__WEBPACK_IMPORTED_MODULE_9__.OptionsLineComponent, { label: "Sampling", options: samplingMode, target: texture, noDirectUpdate: true, propertyName: "samplingMode", onSelect: (value) => {
|
|
72075
72158
|
texture.updateSamplingMode(value);
|
|
72076
72159
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(block);
|
|
72077
|
-
} })), texture && isInReflectionMode && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
72160
|
+
} })), texture && isInReflectionMode && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_optionsLineComponent__WEBPACK_IMPORTED_MODULE_9__.OptionsLineComponent, { label: "Reflection mode", options: reflectionModeOptions, target: texture, propertyName: "coordinatesMode", onSelect: (value) => {
|
|
72078
72161
|
texture.coordinatesMode = value;
|
|
72079
72162
|
this.forceUpdate();
|
|
72080
72163
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(block);
|
|
@@ -72084,25 +72167,25 @@ class TexturePropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Com
|
|
|
72084
72167
|
} })), texture && !isInReflectionMode && !isFrozenTexture && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_sharedComponents_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_5__.CheckBoxLineComponent, { label: "Clamp V", isSelected: () => texture.wrapV === core_Misc_tools__WEBPACK_IMPORTED_MODULE_3__.Texture.CLAMP_ADDRESSMODE, onSelect: (value) => {
|
|
72085
72168
|
texture.wrapV = value ? core_Misc_tools__WEBPACK_IMPORTED_MODULE_3__.Texture.CLAMP_ADDRESSMODE : core_Misc_tools__WEBPACK_IMPORTED_MODULE_3__.Texture.WRAP_ADDRESSMODE;
|
|
72086
72169
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(block);
|
|
72087
|
-
} })), texture && !isInReflectionMode && !isFrozenTexture && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
72170
|
+
} })), texture && !isInReflectionMode && !isFrozenTexture && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_10__.FloatLineComponent, { label: "Offset U", target: texture, propertyName: "uOffset", onChange: () => {
|
|
72088
72171
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(block);
|
|
72089
|
-
} })), texture && !isInReflectionMode && !isFrozenTexture && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
72172
|
+
} })), texture && !isInReflectionMode && !isFrozenTexture && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_10__.FloatLineComponent, { label: "Offset V", target: texture, propertyName: "vOffset", onChange: () => {
|
|
72090
72173
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(block);
|
|
72091
|
-
} })), texture && !isInReflectionMode && !isFrozenTexture && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
72174
|
+
} })), texture && !isInReflectionMode && !isFrozenTexture && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_10__.FloatLineComponent, { label: "Scale U", target: texture, propertyName: "uScale", onChange: () => {
|
|
72092
72175
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(block);
|
|
72093
|
-
} })), texture && !isInReflectionMode && !isFrozenTexture && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
72176
|
+
} })), texture && !isInReflectionMode && !isFrozenTexture && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_10__.FloatLineComponent, { label: "Scale V", target: texture, propertyName: "vScale", onChange: () => {
|
|
72094
72177
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(block);
|
|
72095
|
-
} })), texture && !isInReflectionMode && !isFrozenTexture && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
72178
|
+
} })), texture && !isInReflectionMode && !isFrozenTexture && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_sliderLineComponent__WEBPACK_IMPORTED_MODULE_11__.SliderLineComponent, { label: "Rotation U", target: texture, propertyName: "uAng", minimum: 0, maximum: Math.PI * 2, useEuler: true, step: 0.1, onChange: () => {
|
|
72096
72179
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(block);
|
|
72097
|
-
} })), texture && !isInReflectionMode && !isFrozenTexture && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
72180
|
+
} })), texture && !isInReflectionMode && !isFrozenTexture && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_sliderLineComponent__WEBPACK_IMPORTED_MODULE_11__.SliderLineComponent, { label: "Rotation V", target: texture, propertyName: "vAng", minimum: 0, maximum: Math.PI * 2, useEuler: true, step: 0.1, onChange: () => {
|
|
72098
72181
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(block);
|
|
72099
|
-
} })), texture && !isInReflectionMode && !isFrozenTexture && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
72182
|
+
} })), texture && !isInReflectionMode && !isFrozenTexture && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_sliderLineComponent__WEBPACK_IMPORTED_MODULE_11__.SliderLineComponent, { label: "Rotation W", target: texture, propertyName: "wAng", minimum: 0, maximum: Math.PI * 2, useEuler: true, step: 0.1, onChange: () => {
|
|
72100
72183
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(block);
|
|
72101
72184
|
} }))] })), !this.textureBlock.hasImageSource && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_sharedComponents_lineContainerComponent__WEBPACK_IMPORTED_MODULE_4__.LineContainerComponent, Object.assign({ title: "SOURCE" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_sharedComponents_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_5__.CheckBoxLineComponent, { label: "Embed static texture", isSelected: () => this.state.isEmbedded, onSelect: (value) => {
|
|
72102
72185
|
this.setState({ isEmbedded: value });
|
|
72103
72186
|
this.textureBlock.texture = null;
|
|
72104
72187
|
this.updateAfterTextureLoad();
|
|
72105
|
-
} }), isInReflectionMode && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_sharedComponents_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_5__.CheckBoxLineComponent, { label: "Load as cube texture", isSelected: () => this.state.loadAsCubeTexture, onSelect: (value) => this.setState({ loadAsCubeTexture: value }) })), isInReflectionMode && this.state.loadAsCubeTexture && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_sharedComponents_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_5__.CheckBoxLineComponent, { label: "\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0Texture is prefiltered", isSelected: () => this.state.textureIsPrefiltered, onSelect: (value) => this.setState({ textureIsPrefiltered: value }) })), this.state.isEmbedded && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_sharedComponents_fileButtonLineComponent__WEBPACK_IMPORTED_MODULE_2__.FileButtonLineComponent, { label: "Upload", onClick: (file) => this.replaceTexture(file), accept: ".jpg, .png, .tga, .dds, .env" }), !this.state.isEmbedded && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
72188
|
+
} }), isInReflectionMode && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_sharedComponents_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_5__.CheckBoxLineComponent, { label: "Load as cube texture", isSelected: () => this.state.loadAsCubeTexture, onSelect: (value) => this.setState({ loadAsCubeTexture: value }) })), isInReflectionMode && this.state.loadAsCubeTexture && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_sharedComponents_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_5__.CheckBoxLineComponent, { label: "\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0Texture is prefiltered", isSelected: () => this.state.textureIsPrefiltered, onSelect: (value) => this.setState({ textureIsPrefiltered: value }) })), this.state.isEmbedded && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_sharedComponents_fileButtonLineComponent__WEBPACK_IMPORTED_MODULE_2__.FileButtonLineComponent, { label: "Upload", onClick: (file) => this.replaceTexture(file), accept: ".jpg, .png, .tga, .dds, .env" }), !this.state.isEmbedded && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_7__.TextInputLineComponent, { lockObject: this.props.stateManager.lockObject, label: "Link", value: url, onChange: (newUrl) => this.replaceTextureWithUrl(newUrl) })), !this.state.isEmbedded && url && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_buttonLineComponent__WEBPACK_IMPORTED_MODULE_8__.ButtonLineComponent, { label: "Refresh", onClick: () => this.replaceTextureWithUrl(url + "?nocache=" + this._generateRandomForCache()) })), texture && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_buttonLineComponent__WEBPACK_IMPORTED_MODULE_8__.ButtonLineComponent, { label: "Remove", onClick: () => this.removeTexture() })] }))), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_genericNodePropertyComponent__WEBPACK_IMPORTED_MODULE_6__.GenericPropertyTabComponent, { stateManager: this.props.stateManager, nodeData: this.props.nodeData })] }));
|
|
72106
72189
|
}
|
|
72107
72190
|
}
|
|
72108
72191
|
|
|
@@ -72944,7 +73027,7 @@ class ColorPickerLineComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Compon
|
|
|
72944
73027
|
render() {
|
|
72945
73028
|
const color = this.state.color;
|
|
72946
73029
|
this.props.globalState.lockObject.lock = this.state.pickerEnabled;
|
|
72947
|
-
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ className: "color-picker" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "color-rect", ref: this._floatHostRef, style: { background: this.state.hex }, onClick: () => this.setPickerState(true) }), this.state.pickerEnabled && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "color-picker-cover", onClick: () => this.setPickerState(false) }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "color-picker-float", onClick: (ev) => ev.stopPropagation(), ref: this._floatRef }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_colorPicker_colorPicker__WEBPACK_IMPORTED_MODULE_2__.ColorPicker, { color: color, onColorChanged: (color) => {
|
|
73030
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ className: "color-picker" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "color-rect", ref: this._floatHostRef, style: { background: this.state.hex }, onClick: () => this.setPickerState(true) }), this.state.pickerEnabled && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "color-picker-cover", onClick: () => this.setPickerState(false) }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "color-picker-float", onClick: (ev) => ev.stopPropagation(), ref: this._floatRef }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_colorPicker_colorPicker__WEBPACK_IMPORTED_MODULE_2__.ColorPicker, { lockObject: this.props.globalState.lockObject, color: color, onColorChanged: (color) => {
|
|
72948
73031
|
const hex = color.toHexString();
|
|
72949
73032
|
this.props.onColorChanged(hex);
|
|
72950
73033
|
} }) })) })) }))] })));
|
|
@@ -73048,123 +73131,6 @@ class FileButtonLineComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Compone
|
|
|
73048
73131
|
}
|
|
73049
73132
|
|
|
73050
73133
|
|
|
73051
|
-
/***/ }),
|
|
73052
|
-
|
|
73053
|
-
/***/ "../../../tools/nodeEditor/dist/sharedComponents/floatLineComponent.js":
|
|
73054
|
-
/*!*****************************************************************************!*\
|
|
73055
|
-
!*** ../../../tools/nodeEditor/dist/sharedComponents/floatLineComponent.js ***!
|
|
73056
|
-
\*****************************************************************************/
|
|
73057
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
73058
|
-
|
|
73059
|
-
"use strict";
|
|
73060
|
-
__webpack_require__.r(__webpack_exports__);
|
|
73061
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
73062
|
-
/* harmony export */ "FloatLineComponent": () => (/* binding */ FloatLineComponent)
|
|
73063
|
-
/* harmony export */ });
|
|
73064
|
-
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "../../../../node_modules/react/jsx-runtime.js");
|
|
73065
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "../../../../node_modules/react/index.js");
|
|
73066
|
-
|
|
73067
|
-
|
|
73068
|
-
class FloatLineComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
|
|
73069
|
-
constructor(props) {
|
|
73070
|
-
super(props);
|
|
73071
|
-
this._localChange = false;
|
|
73072
|
-
this._onFocus = false;
|
|
73073
|
-
const currentValue = this.props.target[this.props.propertyName];
|
|
73074
|
-
this.state = { value: currentValue ? (this.props.isInteger ? currentValue.toFixed(0) : currentValue.toFixed(this.props.digits || 4)) : "0" };
|
|
73075
|
-
this._store = currentValue;
|
|
73076
|
-
let rexp = "(.*\\.";
|
|
73077
|
-
let numDigits = this.props.digits || 4;
|
|
73078
|
-
while (numDigits--) {
|
|
73079
|
-
rexp += ".";
|
|
73080
|
-
}
|
|
73081
|
-
rexp += ").+";
|
|
73082
|
-
this._regExp = new RegExp(rexp);
|
|
73083
|
-
}
|
|
73084
|
-
shouldComponentUpdate(nextProps, nextState) {
|
|
73085
|
-
if (this._localChange) {
|
|
73086
|
-
this._localChange = false;
|
|
73087
|
-
return true;
|
|
73088
|
-
}
|
|
73089
|
-
const newValue = nextProps.target[nextProps.propertyName];
|
|
73090
|
-
const newValueString = newValue ? (this.props.isInteger ? newValue.toFixed(0) : newValue.toFixed(this.props.digits || 4)) : "0";
|
|
73091
|
-
if (newValueString !== nextState.value) {
|
|
73092
|
-
nextState.value = newValueString;
|
|
73093
|
-
return true;
|
|
73094
|
-
}
|
|
73095
|
-
return false;
|
|
73096
|
-
}
|
|
73097
|
-
componentWillUnmount() {
|
|
73098
|
-
if (this._onFocus) {
|
|
73099
|
-
if (this.props.onEnter) {
|
|
73100
|
-
this.props.onEnter(this._store);
|
|
73101
|
-
}
|
|
73102
|
-
}
|
|
73103
|
-
}
|
|
73104
|
-
raiseOnPropertyChanged(newValue, previousValue) {
|
|
73105
|
-
if (this.props.onChange) {
|
|
73106
|
-
this.props.onChange(newValue);
|
|
73107
|
-
}
|
|
73108
|
-
if (!this.props.onPropertyChangedObservable) {
|
|
73109
|
-
return;
|
|
73110
|
-
}
|
|
73111
|
-
this.props.onPropertyChangedObservable.notifyObservers({
|
|
73112
|
-
object: this.props.target,
|
|
73113
|
-
property: this.props.propertyName,
|
|
73114
|
-
value: newValue,
|
|
73115
|
-
initialValue: previousValue,
|
|
73116
|
-
});
|
|
73117
|
-
}
|
|
73118
|
-
updateValue(valueString) {
|
|
73119
|
-
if (/[^0-9.-]/g.test(valueString)) {
|
|
73120
|
-
return;
|
|
73121
|
-
}
|
|
73122
|
-
valueString = valueString.replace(this._regExp, "$1");
|
|
73123
|
-
let valueAsNumber;
|
|
73124
|
-
if (this.props.isInteger) {
|
|
73125
|
-
valueAsNumber = parseInt(valueString);
|
|
73126
|
-
}
|
|
73127
|
-
else {
|
|
73128
|
-
valueAsNumber = parseFloat(valueString);
|
|
73129
|
-
}
|
|
73130
|
-
this._localChange = true;
|
|
73131
|
-
this.setState({ value: valueString });
|
|
73132
|
-
if (isNaN(valueAsNumber)) {
|
|
73133
|
-
return;
|
|
73134
|
-
}
|
|
73135
|
-
if (this.props.max != undefined && valueAsNumber > this.props.max) {
|
|
73136
|
-
valueAsNumber = this.props.max;
|
|
73137
|
-
}
|
|
73138
|
-
if (this.props.min != undefined && valueAsNumber < this.props.min) {
|
|
73139
|
-
valueAsNumber = this.props.min;
|
|
73140
|
-
}
|
|
73141
|
-
this.props.target[this.props.propertyName] = valueAsNumber;
|
|
73142
|
-
this.raiseOnPropertyChanged(valueAsNumber, this._store);
|
|
73143
|
-
this._store = valueAsNumber;
|
|
73144
|
-
}
|
|
73145
|
-
render() {
|
|
73146
|
-
const className = this.props.smallUI ? "short" : "value";
|
|
73147
|
-
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ className: this.props.additionalClass ? this.props.additionalClass + " floatLine" : "floatLine" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "label", title: this.props.label }, { children: this.props.label })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: className }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("input", { type: "number", step: this.props.step || "0.01", className: "numeric-input", onBlur: () => {
|
|
73148
|
-
this._onFocus = false;
|
|
73149
|
-
this.props.globalState.lockObject.lock = false;
|
|
73150
|
-
if (this.props.onEnter) {
|
|
73151
|
-
this.props.onEnter(this._store);
|
|
73152
|
-
}
|
|
73153
|
-
}, onKeyDown: (evt) => {
|
|
73154
|
-
if (evt.keyCode !== 13) {
|
|
73155
|
-
return;
|
|
73156
|
-
}
|
|
73157
|
-
if (this.props.onEnter) {
|
|
73158
|
-
this.props.onEnter(this._store);
|
|
73159
|
-
}
|
|
73160
|
-
}, onFocus: () => {
|
|
73161
|
-
this.props.globalState.lockObject.lock = true;
|
|
73162
|
-
this._onFocus = true;
|
|
73163
|
-
}, value: this.state.value, onChange: (evt) => this.updateValue(evt.target.value) }) }))] })) }));
|
|
73164
|
-
}
|
|
73165
|
-
}
|
|
73166
|
-
|
|
73167
|
-
|
|
73168
73134
|
/***/ }),
|
|
73169
73135
|
|
|
73170
73136
|
/***/ "../../../tools/nodeEditor/dist/sharedComponents/lineContainerComponent.js":
|
|
@@ -73370,142 +73336,6 @@ class Popup {
|
|
|
73370
73336
|
}
|
|
73371
73337
|
|
|
73372
73338
|
|
|
73373
|
-
/***/ }),
|
|
73374
|
-
|
|
73375
|
-
/***/ "../../../tools/nodeEditor/dist/sharedComponents/sliderLineComponent.js":
|
|
73376
|
-
/*!******************************************************************************!*\
|
|
73377
|
-
!*** ../../../tools/nodeEditor/dist/sharedComponents/sliderLineComponent.js ***!
|
|
73378
|
-
\******************************************************************************/
|
|
73379
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
73380
|
-
|
|
73381
|
-
"use strict";
|
|
73382
|
-
__webpack_require__.r(__webpack_exports__);
|
|
73383
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
73384
|
-
/* harmony export */ "SliderLineComponent": () => (/* binding */ SliderLineComponent)
|
|
73385
|
-
/* harmony export */ });
|
|
73386
|
-
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "../../../../node_modules/react/jsx-runtime.js");
|
|
73387
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "../../../../node_modules/react/index.js");
|
|
73388
|
-
/* harmony import */ var core_Misc_tools__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core/Misc/tools */ "core/Misc/dataStorage");
|
|
73389
|
-
/* harmony import */ var core_Misc_tools__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_Misc_tools__WEBPACK_IMPORTED_MODULE_2__);
|
|
73390
|
-
/* harmony import */ var _floatLineComponent__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./floatLineComponent */ "../../../tools/nodeEditor/dist/sharedComponents/floatLineComponent.js");
|
|
73391
|
-
|
|
73392
|
-
|
|
73393
|
-
|
|
73394
|
-
|
|
73395
|
-
class SliderLineComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
|
|
73396
|
-
constructor(props) {
|
|
73397
|
-
super(props);
|
|
73398
|
-
this._localChange = false;
|
|
73399
|
-
if (this.props.directValue !== undefined) {
|
|
73400
|
-
this.state = {
|
|
73401
|
-
value: this.props.directValue,
|
|
73402
|
-
};
|
|
73403
|
-
}
|
|
73404
|
-
else {
|
|
73405
|
-
let value = this.props.target[this.props.propertyName];
|
|
73406
|
-
if (value === undefined) {
|
|
73407
|
-
value = this.props.maximum;
|
|
73408
|
-
}
|
|
73409
|
-
this.state = { value: value };
|
|
73410
|
-
}
|
|
73411
|
-
}
|
|
73412
|
-
shouldComponentUpdate(nextProps, nextState) {
|
|
73413
|
-
if (nextProps.directValue !== undefined) {
|
|
73414
|
-
nextState.value = nextProps.directValue;
|
|
73415
|
-
return true;
|
|
73416
|
-
}
|
|
73417
|
-
let currentState = nextProps.target[nextProps.propertyName];
|
|
73418
|
-
if (currentState === undefined) {
|
|
73419
|
-
currentState = nextProps.maximum;
|
|
73420
|
-
}
|
|
73421
|
-
if (currentState !== nextState.value || nextProps.minimum !== this.props.minimum || nextProps.maximum !== this.props.maximum || this._localChange) {
|
|
73422
|
-
nextState.value = Math.min(Math.max(currentState, nextProps.minimum), nextProps.maximum);
|
|
73423
|
-
this._localChange = false;
|
|
73424
|
-
return true;
|
|
73425
|
-
}
|
|
73426
|
-
return false;
|
|
73427
|
-
}
|
|
73428
|
-
onChange(newValueString) {
|
|
73429
|
-
this._localChange = true;
|
|
73430
|
-
let newValue = parseFloat(newValueString);
|
|
73431
|
-
if (this.props.useEuler) {
|
|
73432
|
-
newValue = core_Misc_tools__WEBPACK_IMPORTED_MODULE_2__.Tools.ToRadians(newValue);
|
|
73433
|
-
}
|
|
73434
|
-
if (this.props.target) {
|
|
73435
|
-
if (this.props.onPropertyChangedObservable) {
|
|
73436
|
-
this.props.onPropertyChangedObservable.notifyObservers({
|
|
73437
|
-
object: this.props.target,
|
|
73438
|
-
property: this.props.propertyName,
|
|
73439
|
-
value: newValue,
|
|
73440
|
-
initialValue: this.state.value,
|
|
73441
|
-
});
|
|
73442
|
-
}
|
|
73443
|
-
this.props.target[this.props.propertyName] = newValue;
|
|
73444
|
-
}
|
|
73445
|
-
if (this.props.onChange) {
|
|
73446
|
-
this.props.onChange(newValue);
|
|
73447
|
-
}
|
|
73448
|
-
this.setState({ value: newValue });
|
|
73449
|
-
}
|
|
73450
|
-
onInput(newValueString) {
|
|
73451
|
-
const newValue = parseFloat(newValueString);
|
|
73452
|
-
if (this.props.onInput) {
|
|
73453
|
-
this.props.onInput(newValue);
|
|
73454
|
-
}
|
|
73455
|
-
}
|
|
73456
|
-
prepareDataToRead(value) {
|
|
73457
|
-
if (this.props.useEuler) {
|
|
73458
|
-
return core_Misc_tools__WEBPACK_IMPORTED_MODULE_2__.Tools.ToDegrees(value);
|
|
73459
|
-
}
|
|
73460
|
-
return value;
|
|
73461
|
-
}
|
|
73462
|
-
render() {
|
|
73463
|
-
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ className: "sliderLine" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "label", title: this.props.label }, { children: this.props.label })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_floatLineComponent__WEBPACK_IMPORTED_MODULE_3__.FloatLineComponent, { globalState: this.props.globalState, smallUI: true, label: "", target: this.state, propertyName: "value", min: this.prepareDataToRead(this.props.minimum), max: this.prepareDataToRead(this.props.maximum), onEnter: () => {
|
|
73464
|
-
this.onChange(this.state.value);
|
|
73465
|
-
} }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "slider" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("input", { className: "range", type: "range", step: this.props.step, min: this.prepareDataToRead(this.props.minimum), max: this.prepareDataToRead(this.props.maximum), value: this.prepareDataToRead(this.state.value), onInput: (evt) => this.onInput(evt.target.value), onChange: (evt) => this.onChange(evt.target.value) }) }))] })));
|
|
73466
|
-
}
|
|
73467
|
-
}
|
|
73468
|
-
|
|
73469
|
-
|
|
73470
|
-
/***/ }),
|
|
73471
|
-
|
|
73472
|
-
/***/ "../../../tools/nodeEditor/dist/sharedComponents/textLineComponent.js":
|
|
73473
|
-
/*!****************************************************************************!*\
|
|
73474
|
-
!*** ../../../tools/nodeEditor/dist/sharedComponents/textLineComponent.js ***!
|
|
73475
|
-
\****************************************************************************/
|
|
73476
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
73477
|
-
|
|
73478
|
-
"use strict";
|
|
73479
|
-
__webpack_require__.r(__webpack_exports__);
|
|
73480
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
73481
|
-
/* harmony export */ "TextLineComponent": () => (/* binding */ TextLineComponent)
|
|
73482
|
-
/* harmony export */ });
|
|
73483
|
-
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "../../../../node_modules/react/jsx-runtime.js");
|
|
73484
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "../../../../node_modules/react/index.js");
|
|
73485
|
-
|
|
73486
|
-
|
|
73487
|
-
class TextLineComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
|
|
73488
|
-
constructor(props) {
|
|
73489
|
-
super(props);
|
|
73490
|
-
}
|
|
73491
|
-
onLink() {
|
|
73492
|
-
if (!this.props.onLink) {
|
|
73493
|
-
return;
|
|
73494
|
-
}
|
|
73495
|
-
this.props.onLink();
|
|
73496
|
-
}
|
|
73497
|
-
renderContent() {
|
|
73498
|
-
if (this.props.onLink) {
|
|
73499
|
-
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "link-value", title: this.props.value, onClick: () => this.onLink() }, { children: this.props.value || "no name" })));
|
|
73500
|
-
}
|
|
73501
|
-
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "value", title: this.props.value, style: { color: this.props.color ? this.props.color : "" } }, { children: this.props.value || "no name" })));
|
|
73502
|
-
}
|
|
73503
|
-
render() {
|
|
73504
|
-
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", Object.assign({ className: this.props.underline ? "textLine underline" : "textLine" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", Object.assign({ className: "label", title: this.props.label }, { children: this.props.label })), this.renderContent()] })));
|
|
73505
|
-
}
|
|
73506
|
-
}
|
|
73507
|
-
|
|
73508
|
-
|
|
73509
73339
|
/***/ }),
|
|
73510
73340
|
|
|
73511
73341
|
/***/ "../../../tools/nodeEditor/dist/sharedComponents/textureLineComponent.js":
|