@babylonjs/node-editor 5.13.3 → 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
|
/***/ }),
|
|
@@ -65643,13 +65928,13 @@ class GraphNode {
|
|
|
65643
65928
|
getPortForPortData(portData) {
|
|
65644
65929
|
for (const port of this._inputPorts) {
|
|
65645
65930
|
const attachedPoint = port.portData;
|
|
65646
|
-
if (attachedPoint === portData) {
|
|
65931
|
+
if (attachedPoint === portData || (attachedPoint.ownerData === portData.ownerData && attachedPoint.internalName === portData.internalName)) {
|
|
65647
65932
|
return port;
|
|
65648
65933
|
}
|
|
65649
65934
|
}
|
|
65650
65935
|
for (const port of this._outputPorts) {
|
|
65651
65936
|
const attachedPoint = port.portData;
|
|
65652
|
-
if (attachedPoint === portData) {
|
|
65937
|
+
if (attachedPoint === portData || (attachedPoint.ownerData === portData.ownerData && attachedPoint.internalName === portData.internalName)) {
|
|
65653
65938
|
return port;
|
|
65654
65939
|
}
|
|
65655
65940
|
}
|
|
@@ -66016,7 +66301,7 @@ class NodeLink {
|
|
|
66016
66301
|
const pointA = this._portA.portData;
|
|
66017
66302
|
const nodeB = this._nodeB;
|
|
66018
66303
|
const pointB = this._portB.portData;
|
|
66019
|
-
if (stateManager.isElbowConnectionAllowed(this._portA, this._portB)) {
|
|
66304
|
+
if (!stateManager.isElbowConnectionAllowed(this._portA, this._portB)) {
|
|
66020
66305
|
return;
|
|
66021
66306
|
}
|
|
66022
66307
|
// Create an elbow at the clicked location
|
|
@@ -66025,8 +66310,8 @@ class NodeLink {
|
|
|
66025
66310
|
// Delete previous link
|
|
66026
66311
|
this.dispose();
|
|
66027
66312
|
// Connect to Elbow block
|
|
66028
|
-
this._graphCanvas.connectNodes(nodeA, pointA, newNode, newElbowBlock.input);
|
|
66029
|
-
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);
|
|
66030
66315
|
stateManager.onRebuildRequiredObservable.notifyObservers(true);
|
|
66031
66316
|
});
|
|
66032
66317
|
stateManager.onNewBlockRequiredObservable.notifyObservers({
|
|
@@ -68421,16 +68706,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
68421
68706
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "../../../../node_modules/react/index.js");
|
|
68422
68707
|
/* harmony import */ var _sharedComponents_lineContainerComponent__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../sharedComponents/lineContainerComponent */ "../../../tools/nodeEditor/dist/sharedComponents/lineContainerComponent.js");
|
|
68423
68708
|
/* harmony import */ var _sharedComponents_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../sharedComponents/checkBoxLineComponent */ "../../../tools/nodeEditor/dist/sharedComponents/checkBoxLineComponent.js");
|
|
68424
|
-
/* harmony import */ var
|
|
68425
|
-
/* harmony import */ var
|
|
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
|
|
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");
|
|
68434
68719
|
|
|
68435
68720
|
|
|
68436
68721
|
|
|
@@ -68456,22 +68741,22 @@ class InputsPropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Comp
|
|
|
68456
68741
|
}
|
|
68457
68742
|
renderInputBlock(block) {
|
|
68458
68743
|
switch (block.type) {
|
|
68459
|
-
case
|
|
68744
|
+
case core_Materials_Node_Enums_nodeMaterialBlockConnectionPointTypes__WEBPACK_IMPORTED_MODULE_4__.NodeMaterialBlockConnectionPointTypes.Float: {
|
|
68460
68745
|
const cantDisplaySlider = isNaN(block.min) || isNaN(block.max) || block.min === block.max;
|
|
68461
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: () => {
|
|
68462
68747
|
this.processInputBlockUpdate(block);
|
|
68463
|
-
} }, 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));
|
|
68464
68749
|
}
|
|
68465
|
-
case
|
|
68466
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
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)(
|
|
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));
|
|
68475
68760
|
}
|
|
68476
68761
|
return null;
|
|
68477
68762
|
}
|
|
@@ -68507,7 +68792,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
68507
68792
|
|
|
68508
68793
|
class Color3PropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
|
|
68509
68794
|
render() {
|
|
68510
|
-
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: () => {
|
|
68511
68796
|
this.props.globalState.stateManager.onUpdateRequiredObservable.notifyObservers(this.props.inputBlock);
|
|
68512
68797
|
} }));
|
|
68513
68798
|
}
|
|
@@ -68535,7 +68820,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
68535
68820
|
|
|
68536
68821
|
class Color4PropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
|
|
68537
68822
|
render() {
|
|
68538
|
-
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: () => {
|
|
68539
68824
|
this.props.globalState.stateManager.onUpdateRequiredObservable.notifyObservers(this.props.inputBlock);
|
|
68540
68825
|
} }));
|
|
68541
68826
|
}
|
|
@@ -68557,13 +68842,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
68557
68842
|
/* harmony export */ });
|
|
68558
68843
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "../../../../node_modules/react/jsx-runtime.js");
|
|
68559
68844
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "../../../../node_modules/react/index.js");
|
|
68560
|
-
/* 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");
|
|
68561
68846
|
|
|
68562
68847
|
|
|
68563
68848
|
|
|
68564
68849
|
class FloatPropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
|
|
68565
68850
|
render() {
|
|
68566
|
-
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: () => {
|
|
68567
68852
|
if (this.props.inputBlock.isConstant) {
|
|
68568
68853
|
this.props.globalState.stateManager.onRebuildRequiredObservable.notifyObservers(true);
|
|
68569
68854
|
}
|
|
@@ -68594,7 +68879,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
68594
68879
|
|
|
68595
68880
|
class MatrixPropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
|
|
68596
68881
|
render() {
|
|
68597
|
-
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: () => {
|
|
68598
68883
|
this.props.globalState.stateManager.onUpdateRequiredObservable.notifyObservers(this.props.inputBlock);
|
|
68599
68884
|
}, mode: this.props.inputBlock.matrixMode, onModeChange: (mode) => {
|
|
68600
68885
|
this.props.inputBlock.matrixMode = mode;
|
|
@@ -68624,7 +68909,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
68624
68909
|
|
|
68625
68910
|
class Vector2PropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
|
|
68626
68911
|
render() {
|
|
68627
|
-
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: () => {
|
|
68628
68913
|
this.props.globalState.stateManager.onUpdateRequiredObservable.notifyObservers(this.props.inputBlock);
|
|
68629
68914
|
} }));
|
|
68630
68915
|
}
|
|
@@ -68652,7 +68937,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
68652
68937
|
|
|
68653
68938
|
class Vector3PropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
|
|
68654
68939
|
render() {
|
|
68655
|
-
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: () => {
|
|
68656
68941
|
this.props.globalState.stateManager.onUpdateRequiredObservable.notifyObservers(this.props.inputBlock);
|
|
68657
68942
|
} }));
|
|
68658
68943
|
}
|
|
@@ -68680,7 +68965,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
68680
68965
|
|
|
68681
68966
|
class Vector4PropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
|
|
68682
68967
|
render() {
|
|
68683
|
-
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: () => {
|
|
68684
68969
|
this.props.globalState.stateManager.onUpdateRequiredObservable.notifyObservers(this.props.inputBlock);
|
|
68685
68970
|
} }));
|
|
68686
68971
|
}
|
|
@@ -68709,28 +68994,28 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
68709
68994
|
/* harmony import */ var core_Misc_tools__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(core_Misc_tools__WEBPACK_IMPORTED_MODULE_5__);
|
|
68710
68995
|
/* harmony import */ var _serializationTools__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../serializationTools */ "../../../tools/nodeEditor/dist/serializationTools.js");
|
|
68711
68996
|
/* harmony import */ var _sharedComponents_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../sharedComponents/checkBoxLineComponent */ "../../../tools/nodeEditor/dist/sharedComponents/checkBoxLineComponent.js");
|
|
68712
|
-
/* harmony import */ var
|
|
68713
|
-
/* harmony import */ var
|
|
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
|
|
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");
|
|
68734
69019
|
|
|
68735
69020
|
|
|
68736
69021
|
|
|
@@ -68776,16 +69061,16 @@ class PropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component
|
|
|
68776
69061
|
componentDidMount() {
|
|
68777
69062
|
this.props.globalState.stateManager.onSelectionChangedObservable.add((options) => {
|
|
68778
69063
|
const { selection } = options || {};
|
|
68779
|
-
if (selection instanceof
|
|
69064
|
+
if (selection instanceof shared_ui_components_nodeGraphSystem_graphNode__WEBPACK_IMPORTED_MODULE_15__.GraphNode) {
|
|
68780
69065
|
this.setState({ currentNode: selection, currentFrame: null, currentFrameNodePort: null, currentNodePort: null });
|
|
68781
69066
|
}
|
|
68782
|
-
else if (selection instanceof
|
|
69067
|
+
else if (selection instanceof shared_ui_components_nodeGraphSystem_graphFrame__WEBPACK_IMPORTED_MODULE_16__.GraphFrame) {
|
|
68783
69068
|
this.setState({ currentNode: null, currentFrame: selection, currentFrameNodePort: null, currentNodePort: null });
|
|
68784
69069
|
}
|
|
68785
|
-
else if ((0,
|
|
69070
|
+
else if ((0,shared_ui_components_nodeGraphSystem_tools__WEBPACK_IMPORTED_MODULE_18__.IsFramePortData)(selection)) {
|
|
68786
69071
|
this.setState({ currentNode: null, currentFrame: selection.frame, currentFrameNodePort: selection.port, currentNodePort: null });
|
|
68787
69072
|
}
|
|
68788
|
-
else if (selection instanceof
|
|
69073
|
+
else if (selection instanceof shared_ui_components_nodeGraphSystem_nodePort__WEBPACK_IMPORTED_MODULE_17__.NodePort) {
|
|
68789
69074
|
this.setState({ currentNode: null, currentFrame: null, currentFrameNodePort: null, currentNodePort: selection });
|
|
68790
69075
|
}
|
|
68791
69076
|
else {
|
|
@@ -68811,18 +69096,18 @@ class PropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component
|
|
|
68811
69096
|
const cantDisplaySlider = isNaN(block.min) || isNaN(block.max) || block.min === block.max;
|
|
68812
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: () => {
|
|
68813
69098
|
this.processInputBlockUpdate(block);
|
|
68814
|
-
} }, 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));
|
|
68815
69100
|
}
|
|
68816
69101
|
case core_Misc_tools__WEBPACK_IMPORTED_MODULE_5__.NodeMaterialBlockConnectionPointTypes.Color3:
|
|
68817
|
-
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));
|
|
68818
69103
|
case core_Misc_tools__WEBPACK_IMPORTED_MODULE_5__.NodeMaterialBlockConnectionPointTypes.Color4:
|
|
68819
|
-
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));
|
|
68820
69105
|
case core_Misc_tools__WEBPACK_IMPORTED_MODULE_5__.NodeMaterialBlockConnectionPointTypes.Vector2:
|
|
68821
|
-
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));
|
|
68822
69107
|
case core_Misc_tools__WEBPACK_IMPORTED_MODULE_5__.NodeMaterialBlockConnectionPointTypes.Vector3:
|
|
68823
|
-
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));
|
|
68824
69109
|
case core_Misc_tools__WEBPACK_IMPORTED_MODULE_5__.NodeMaterialBlockConnectionPointTypes.Vector4:
|
|
68825
|
-
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));
|
|
68826
69111
|
}
|
|
68827
69112
|
return null;
|
|
68828
69113
|
}
|
|
@@ -68850,15 +69135,15 @@ class PropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component
|
|
|
68850
69135
|
}
|
|
68851
69136
|
customSave() {
|
|
68852
69137
|
this.setState({ uploadInProgress: true });
|
|
68853
|
-
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));
|
|
68854
69139
|
this.props.globalState
|
|
68855
69140
|
.customSave.action(_serializationTools__WEBPACK_IMPORTED_MODULE_6__.SerializationTools.Serialize(this.props.globalState.nodeMaterial, this.props.globalState))
|
|
68856
69141
|
.then(() => {
|
|
68857
|
-
this.props.globalState.onLogRequiredObservable.notifyObservers(new
|
|
69142
|
+
this.props.globalState.onLogRequiredObservable.notifyObservers(new _log_logComponent__WEBPACK_IMPORTED_MODULE_13__.LogEntry("Material saved successfully", false));
|
|
68858
69143
|
this.setState({ uploadInProgress: false });
|
|
68859
69144
|
})
|
|
68860
69145
|
.catch((err) => {
|
|
68861
|
-
this.props.globalState.onLogRequiredObservable.notifyObservers(new
|
|
69146
|
+
this.props.globalState.onLogRequiredObservable.notifyObservers(new _log_logComponent__WEBPACK_IMPORTED_MODULE_13__.LogEntry(err, true));
|
|
68862
69147
|
this.setState({ uploadInProgress: false });
|
|
68863
69148
|
});
|
|
68864
69149
|
}
|
|
@@ -68954,10 +69239,10 @@ class PropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component
|
|
|
68954
69239
|
}
|
|
68955
69240
|
switch (value) {
|
|
68956
69241
|
case core_Misc_tools__WEBPACK_IMPORTED_MODULE_5__.NodeMaterialModes.Material:
|
|
68957
|
-
this.props.globalState.previewType =
|
|
69242
|
+
this.props.globalState.previewType = _preview_previewType__WEBPACK_IMPORTED_MODULE_11__.PreviewType.Sphere;
|
|
68958
69243
|
break;
|
|
68959
69244
|
case core_Misc_tools__WEBPACK_IMPORTED_MODULE_5__.NodeMaterialModes.Particle:
|
|
68960
|
-
this.props.globalState.previewType =
|
|
69245
|
+
this.props.globalState.previewType = _preview_previewType__WEBPACK_IMPORTED_MODULE_11__.PreviewType.Bubbles;
|
|
68961
69246
|
break;
|
|
68962
69247
|
}
|
|
68963
69248
|
this.props.globalState.listOfCustomPreviewFiles = [];
|
|
@@ -68973,13 +69258,13 @@ class PropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component
|
|
|
68973
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())] })));
|
|
68974
69259
|
}
|
|
68975
69260
|
if (this.state.currentFrameNodePort && this.state.currentFrame) {
|
|
68976
|
-
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 }));
|
|
68977
69262
|
}
|
|
68978
69263
|
if (this.state.currentNodePort) {
|
|
68979
|
-
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 });
|
|
68980
69265
|
}
|
|
68981
69266
|
if (this.state.currentFrame) {
|
|
68982
|
-
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 });
|
|
68983
69268
|
}
|
|
68984
69269
|
const gridSize = core_Misc_tools__WEBPACK_IMPORTED_MODULE_5__.DataStorage.ReadNumber("GridSize", 20);
|
|
68985
69270
|
const modeList = [
|
|
@@ -68997,7 +69282,7 @@ class PropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component
|
|
|
68997
69282
|
{ label: "Maximized", value: core_Misc_tools__WEBPACK_IMPORTED_MODULE_5__.Constants.ALPHA_MAXIMIZED },
|
|
68998
69283
|
{ label: "Pre-multiplied", value: core_Misc_tools__WEBPACK_IMPORTED_MODULE_5__.Constants.ALPHA_PREMULTIPLIED },
|
|
68999
69284
|
];
|
|
69000
|
-
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: () => {
|
|
69001
69286
|
switch (this.props.globalState.mode) {
|
|
69002
69287
|
case core_Misc_tools__WEBPACK_IMPORTED_MODULE_5__.NodeMaterialModes.Material:
|
|
69003
69288
|
this.props.globalState.nodeMaterial.setToDefault();
|
|
@@ -69013,31 +69298,31 @@ class PropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component
|
|
|
69013
69298
|
break;
|
|
69014
69299
|
}
|
|
69015
69300
|
this.props.globalState.onResetRequiredObservable.notifyObservers(true);
|
|
69016
|
-
} })] })), (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: () => {
|
|
69017
69302
|
this.props.globalState.onZoomToFitRequiredObservable.notifyObservers();
|
|
69018
|
-
} }), (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: () => {
|
|
69019
69304
|
this.props.globalState.onReOrganizedRequiredObservable.notifyObservers();
|
|
69020
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) => {
|
|
69021
69306
|
core_Misc_tools__WEBPACK_IMPORTED_MODULE_5__.DataStorage.WriteBoolean("EmbedTextures", value);
|
|
69022
|
-
} }), (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) => {
|
|
69023
69308
|
core_Misc_tools__WEBPACK_IMPORTED_MODULE_5__.DataStorage.WriteNumber("GridSize", value);
|
|
69024
69309
|
this.props.globalState.stateManager.onGridSizeChanged.notifyObservers();
|
|
69025
69310
|
this.forceUpdate();
|
|
69026
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) => {
|
|
69027
69312
|
core_Misc_tools__WEBPACK_IMPORTED_MODULE_5__.DataStorage.WriteBoolean("ShowGrid", value);
|
|
69028
69313
|
this.props.globalState.stateManager.onGridSizeChanged.notifyObservers();
|
|
69029
|
-
} })] })), (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: () => {
|
|
69030
69315
|
this.save();
|
|
69031
|
-
} }), (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: () => {
|
|
69032
69317
|
shared_ui_components_stringTools__WEBPACK_IMPORTED_MODULE_3__.StringTools.DownloadAsFile(this.props.globalState.hostDocument, this.props.globalState.nodeMaterial.generateCode(), "code.txt");
|
|
69033
|
-
} }), (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: () => {
|
|
69034
69319
|
this.props.globalState.nodeMaterial.build();
|
|
69035
69320
|
shared_ui_components_stringTools__WEBPACK_IMPORTED_MODULE_3__.StringTools.DownloadAsFile(this.props.globalState.hostDocument, this.props.globalState.nodeMaterial.compiledShaders, "shaders.txt");
|
|
69036
|
-
} }), 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: () => {
|
|
69037
69322
|
this.customSave();
|
|
69038
|
-
} })), (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: () => {
|
|
69039
69324
|
this.saveToSnippetServer();
|
|
69040
|
-
} })] }))), (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() })] })] })));
|
|
69041
69326
|
}
|
|
69042
69327
|
}
|
|
69043
69328
|
|
|
@@ -69162,9 +69447,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
69162
69447
|
/* harmony import */ var _sharedComponents_popup__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./sharedComponents/popup */ "../../../tools/nodeEditor/dist/sharedComponents/popup.js");
|
|
69163
69448
|
/* harmony import */ var _main_scss__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./main.scss */ "../../../tools/nodeEditor/dist/main.scss");
|
|
69164
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");
|
|
69165
|
-
/* harmony import */ var
|
|
69166
|
-
/* 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");
|
|
69167
|
-
|
|
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");
|
|
69168
69451
|
|
|
69169
69452
|
|
|
69170
69453
|
|
|
@@ -69191,8 +69474,6 @@ class GraphEditor extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
|
|
|
69191
69474
|
super(props);
|
|
69192
69475
|
this._leftWidth = core_Materials_Node_nodeMaterialBlock__WEBPACK_IMPORTED_MODULE_2__.DataStorage.ReadNumber("LeftWidth", 200);
|
|
69193
69476
|
this._rightWidth = core_Materials_Node_nodeMaterialBlock__WEBPACK_IMPORTED_MODULE_2__.DataStorage.ReadNumber("RightWidth", 300);
|
|
69194
|
-
this._copiedNodes = [];
|
|
69195
|
-
this._copiedFrames = [];
|
|
69196
69477
|
this._mouseLocationX = 0;
|
|
69197
69478
|
this._mouseLocationY = 0;
|
|
69198
69479
|
this.handlePopUp = () => {
|
|
@@ -69383,115 +69664,20 @@ class GraphEditor extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
|
|
|
69383
69664
|
return this._graphCanvas.findNodeFromData(block);
|
|
69384
69665
|
};
|
|
69385
69666
|
this.props.globalState.hostDocument.addEventListener("keydown", (evt) => {
|
|
69386
|
-
|
|
69387
|
-
|
|
69388
|
-
|
|
69389
|
-
|
|
69390
|
-
|
|
69391
|
-
|
|
69392
|
-
|
|
69393
|
-
this._graphCanvas.removeDataFromCache(targetBlock);
|
|
69394
|
-
}
|
|
69395
|
-
if (this._graphCanvas.selectedLink) {
|
|
69396
|
-
this._graphCanvas.selectedLink.dispose();
|
|
69397
|
-
}
|
|
69398
|
-
if (this._graphCanvas.selectedFrames.length) {
|
|
69399
|
-
for (const frame of this._graphCanvas.selectedFrames) {
|
|
69400
|
-
if (frame.isCollapsed) {
|
|
69401
|
-
while (frame.nodes.length > 0) {
|
|
69402
|
-
const targetBlock = frame.nodes[0].content.data;
|
|
69403
|
-
this.props.globalState.nodeMaterial.removeBlock(targetBlock);
|
|
69404
|
-
this._graphCanvas.removeDataFromCache(targetBlock);
|
|
69405
|
-
frame.nodes[0].dispose();
|
|
69406
|
-
}
|
|
69407
|
-
frame.isCollapsed = false;
|
|
69408
|
-
}
|
|
69409
|
-
else {
|
|
69410
|
-
frame.nodes.forEach((node) => {
|
|
69411
|
-
node.enclosingFrameId = -1;
|
|
69412
|
-
});
|
|
69413
|
-
}
|
|
69414
|
-
frame.dispose();
|
|
69415
|
-
}
|
|
69416
|
-
}
|
|
69417
|
-
this.props.globalState.stateManager.onSelectionChangedObservable.notifyObservers(null);
|
|
69418
|
-
this.props.globalState.stateManager.onRebuildRequiredObservable.notifyObservers(false);
|
|
69419
|
-
return;
|
|
69420
|
-
}
|
|
69421
|
-
if (!evt.ctrlKey || this.props.globalState.lockObject.lock) {
|
|
69422
|
-
return;
|
|
69423
|
-
}
|
|
69424
|
-
if (evt.key === "c" || evt.key === "C") {
|
|
69425
|
-
// Copy
|
|
69426
|
-
this._copiedNodes = [];
|
|
69427
|
-
this._copiedFrames = [];
|
|
69428
|
-
if (this._graphCanvas.selectedFrames.length) {
|
|
69429
|
-
for (const frame of this._graphCanvas.selectedFrames) {
|
|
69430
|
-
frame.serialize(true);
|
|
69431
|
-
this._copiedFrames.push(frame);
|
|
69432
|
-
}
|
|
69433
|
-
return;
|
|
69434
|
-
}
|
|
69435
|
-
const selectedItems = this._graphCanvas.selectedNodes;
|
|
69436
|
-
if (!selectedItems.length) {
|
|
69437
|
-
return;
|
|
69438
|
-
}
|
|
69439
|
-
const selectedItem = selectedItems[0];
|
|
69440
|
-
if (!selectedItem.content.data) {
|
|
69441
|
-
return;
|
|
69442
|
-
}
|
|
69443
|
-
this._copiedNodes = selectedItems.slice(0);
|
|
69444
|
-
}
|
|
69445
|
-
else if (evt.key === "v" || evt.key === "V") {
|
|
69446
|
-
// Paste
|
|
69447
|
-
const rootElement = this.props.globalState.hostDocument.querySelector(".diagram-container");
|
|
69448
|
-
const zoomLevel = this._graphCanvas.zoom;
|
|
69449
|
-
let currentY = (this._mouseLocationY - rootElement.offsetTop - this._graphCanvas.y - 20) / zoomLevel;
|
|
69450
|
-
if (this._copiedFrames.length) {
|
|
69451
|
-
for (const frame of this._copiedFrames) {
|
|
69452
|
-
// New frame
|
|
69453
|
-
const newFrame = new shared_ui_components_nodeGraphSystem_graphFrame__WEBPACK_IMPORTED_MODULE_17__.GraphFrame(null, this._graphCanvas, true);
|
|
69454
|
-
this._graphCanvas.frames.push(newFrame);
|
|
69455
|
-
newFrame.width = frame.width;
|
|
69456
|
-
newFrame.height = frame.height;
|
|
69457
|
-
newFrame.width / 2;
|
|
69458
|
-
newFrame.name = frame.name;
|
|
69459
|
-
newFrame.color = frame.color;
|
|
69460
|
-
let currentX = (this._mouseLocationX - rootElement.offsetLeft - this._graphCanvas.x) / zoomLevel;
|
|
69461
|
-
newFrame.x = currentX - newFrame.width / 2;
|
|
69462
|
-
newFrame.y = currentY;
|
|
69463
|
-
// Paste nodes
|
|
69464
|
-
if (frame.nodes.length) {
|
|
69465
|
-
currentX = newFrame.x + frame.nodes[0].x - frame.x;
|
|
69466
|
-
currentY = newFrame.y + frame.nodes[0].y - frame.y;
|
|
69467
|
-
this._graphCanvas._frameIsMoving = true;
|
|
69468
|
-
const newNodes = this.pasteSelection(frame.nodes, currentX, currentY);
|
|
69469
|
-
if (newNodes) {
|
|
69470
|
-
for (const node of newNodes) {
|
|
69471
|
-
newFrame.syncNode(node);
|
|
69472
|
-
}
|
|
69473
|
-
}
|
|
69474
|
-
this._graphCanvas._frameIsMoving = false;
|
|
69475
|
-
}
|
|
69476
|
-
newFrame.adjustPorts();
|
|
69477
|
-
if (frame.isCollapsed) {
|
|
69478
|
-
newFrame.isCollapsed = true;
|
|
69479
|
-
}
|
|
69480
|
-
// Select
|
|
69481
|
-
this.props.globalState.stateManager.onSelectionChangedObservable.notifyObservers({ selection: newFrame, forceKeepSelection: true });
|
|
69482
|
-
return;
|
|
69483
|
-
}
|
|
69484
|
-
}
|
|
69485
|
-
if (!this._copiedNodes.length) {
|
|
69486
|
-
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;
|
|
69487
69674
|
}
|
|
69488
|
-
|
|
69489
|
-
|
|
69490
|
-
|
|
69491
|
-
}, false);
|
|
69675
|
+
return this.appendBlock(clone, false);
|
|
69676
|
+
}, this.props.globalState.hostDocument.querySelector(".diagram-container"));
|
|
69677
|
+
});
|
|
69492
69678
|
}
|
|
69493
69679
|
appendBlock(dataToAppend, recursion = true) {
|
|
69494
|
-
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) => {
|
|
69495
69681
|
if (this.props.globalState.nodeMaterial.attachedBlocks.indexOf(block) === -1) {
|
|
69496
69682
|
this.props.globalState.nodeMaterial.attachedBlocks.push(block);
|
|
69497
69683
|
}
|
|
@@ -69531,83 +69717,6 @@ class GraphEditor extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
|
|
|
69531
69717
|
this._previewManager = null;
|
|
69532
69718
|
}
|
|
69533
69719
|
}
|
|
69534
|
-
reconnectNewNodes(nodeIndex, newNodes, sourceNodes, done) {
|
|
69535
|
-
if (done[nodeIndex]) {
|
|
69536
|
-
return;
|
|
69537
|
-
}
|
|
69538
|
-
const currentNode = newNodes[nodeIndex];
|
|
69539
|
-
const sourceNode = sourceNodes[nodeIndex];
|
|
69540
|
-
for (let inputIndex = 0; inputIndex < sourceNode.content.inputs.length; inputIndex++) {
|
|
69541
|
-
const sourceInput = sourceNode.content.inputs[inputIndex];
|
|
69542
|
-
const currentInput = currentNode.content.inputs[inputIndex];
|
|
69543
|
-
if (!sourceInput.isConnected) {
|
|
69544
|
-
continue;
|
|
69545
|
-
}
|
|
69546
|
-
const sourceBlock = this._graphCanvas.findNodeFromData(sourceInput.connectedPort.ownerData).content;
|
|
69547
|
-
const activeNodes = sourceNodes.filter((s) => s.content.data === sourceBlock);
|
|
69548
|
-
if (activeNodes.length > 0) {
|
|
69549
|
-
const activeNode = activeNodes[0];
|
|
69550
|
-
const indexInList = sourceNodes.indexOf(activeNode);
|
|
69551
|
-
// First make sure to connect the other one
|
|
69552
|
-
this.reconnectNewNodes(indexInList, newNodes, sourceNodes, done);
|
|
69553
|
-
// Then reconnect
|
|
69554
|
-
const outputIndex = sourceBlock.outputs.indexOf(sourceInput.connectedPort);
|
|
69555
|
-
const newOutput = newNodes[indexInList].content.data.outputs[outputIndex];
|
|
69556
|
-
newOutput.connectTo(currentInput);
|
|
69557
|
-
}
|
|
69558
|
-
else {
|
|
69559
|
-
// Connect with outside blocks
|
|
69560
|
-
sourceInput.connectedPort.connectTo(currentInput);
|
|
69561
|
-
}
|
|
69562
|
-
this._graphCanvas.connectPorts(currentInput.connectedPort, currentInput);
|
|
69563
|
-
}
|
|
69564
|
-
currentNode.refresh();
|
|
69565
|
-
done[nodeIndex] = true;
|
|
69566
|
-
}
|
|
69567
|
-
pasteSelection(copiedNodes, currentX, currentY, selectNew = false) {
|
|
69568
|
-
let originalNode = null;
|
|
69569
|
-
const newNodes = [];
|
|
69570
|
-
// Copy to prevent recursive side effects while creating nodes.
|
|
69571
|
-
copiedNodes = copiedNodes.slice();
|
|
69572
|
-
// Cancel selection
|
|
69573
|
-
this.props.globalState.stateManager.onSelectionChangedObservable.notifyObservers(null);
|
|
69574
|
-
// Create new nodes
|
|
69575
|
-
for (const node of copiedNodes) {
|
|
69576
|
-
const block = node.content.data;
|
|
69577
|
-
if (!block) {
|
|
69578
|
-
continue;
|
|
69579
|
-
}
|
|
69580
|
-
const clone = block.clone(this.props.globalState.nodeMaterial.getScene());
|
|
69581
|
-
if (!clone) {
|
|
69582
|
-
return;
|
|
69583
|
-
}
|
|
69584
|
-
const newNode = this.appendBlock(clone, false);
|
|
69585
|
-
let x = 0;
|
|
69586
|
-
let y = 0;
|
|
69587
|
-
if (originalNode) {
|
|
69588
|
-
x = currentX + node.x - originalNode.x;
|
|
69589
|
-
y = currentY + node.y - originalNode.y;
|
|
69590
|
-
}
|
|
69591
|
-
else {
|
|
69592
|
-
originalNode = node;
|
|
69593
|
-
x = currentX;
|
|
69594
|
-
y = currentY;
|
|
69595
|
-
}
|
|
69596
|
-
newNode.x = x;
|
|
69597
|
-
newNode.y = y;
|
|
69598
|
-
newNode.cleanAccumulation();
|
|
69599
|
-
newNodes.push(newNode);
|
|
69600
|
-
if (selectNew) {
|
|
69601
|
-
this.props.globalState.stateManager.onSelectionChangedObservable.notifyObservers({ selection: newNode, forceKeepSelection: true });
|
|
69602
|
-
}
|
|
69603
|
-
}
|
|
69604
|
-
// Relink
|
|
69605
|
-
const done = new Array(newNodes.length);
|
|
69606
|
-
for (let index = 0; index < newNodes.length; index++) {
|
|
69607
|
-
this.reconnectNewNodes(index, newNodes, copiedNodes, done);
|
|
69608
|
-
}
|
|
69609
|
-
return newNodes;
|
|
69610
|
-
}
|
|
69611
69720
|
zoomToFit() {
|
|
69612
69721
|
this._graphCanvas.zoomToFit();
|
|
69613
69722
|
}
|
|
@@ -69745,7 +69854,7 @@ class GraphEditor extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
|
|
|
69745
69854
|
if (storageData) {
|
|
69746
69855
|
const frameData = JSON.parse(storageData);
|
|
69747
69856
|
//edit position before loading.
|
|
69748
|
-
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;
|
|
69749
69858
|
const newY = (targetY - this._graphCanvas.y - 20) / this._graphCanvas.zoom;
|
|
69750
69859
|
const oldX = frameData.editorData.frames[0].x;
|
|
69751
69860
|
const oldY = frameData.editorData.frames[0].y;
|
|
@@ -69786,37 +69895,14 @@ class GraphEditor extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
|
|
|
69786
69895
|
newNode = this.appendBlock(block);
|
|
69787
69896
|
}
|
|
69788
69897
|
// Size exceptions
|
|
69789
|
-
let offsetX =
|
|
69898
|
+
let offsetX = shared_ui_components_nodeGraphSystem_graphCanvas__WEBPACK_IMPORTED_MODULE_16__.GraphCanvasComponent.NodeWidth;
|
|
69790
69899
|
let offsetY = 20;
|
|
69791
69900
|
if (blockType === "ElbowBlock") {
|
|
69792
69901
|
offsetX = 10;
|
|
69793
69902
|
offsetY = 10;
|
|
69794
69903
|
}
|
|
69795
69904
|
// Drop
|
|
69796
|
-
|
|
69797
|
-
let y = targetY - this._graphCanvas.y - offsetY * this._graphCanvas.zoom;
|
|
69798
|
-
newNode.x = x / this._graphCanvas.zoom;
|
|
69799
|
-
newNode.y = y / this._graphCanvas.zoom;
|
|
69800
|
-
newNode.cleanAccumulation();
|
|
69801
|
-
this.props.globalState.stateManager.onNewNodeCreatedObservable.notifyObservers(newNode);
|
|
69802
|
-
this.props.globalState.stateManager.onSelectionChangedObservable.notifyObservers(null);
|
|
69803
|
-
this.props.globalState.stateManager.onSelectionChangedObservable.notifyObservers({ selection: newNode });
|
|
69804
|
-
const block = newNode.content.data;
|
|
69805
|
-
x -= GraphEditor.NodeWidth + 150;
|
|
69806
|
-
block.inputs.forEach((connection) => {
|
|
69807
|
-
if (connection.connectedPoint) {
|
|
69808
|
-
const existingNodes = this._graphCanvas.nodes.filter((n) => {
|
|
69809
|
-
return n.content.data === connection.connectedPoint.ownerBlock;
|
|
69810
|
-
});
|
|
69811
|
-
const connectedNode = existingNodes[0];
|
|
69812
|
-
if (connectedNode.x === 0 && connectedNode.y === 0) {
|
|
69813
|
-
connectedNode.x = x / this._graphCanvas.zoom;
|
|
69814
|
-
connectedNode.y = y / this._graphCanvas.zoom;
|
|
69815
|
-
connectedNode.cleanAccumulation();
|
|
69816
|
-
y += 80;
|
|
69817
|
-
}
|
|
69818
|
-
}
|
|
69819
|
-
});
|
|
69905
|
+
this._graphCanvas.drop(newNode, targetX, targetY, offsetX, offsetY);
|
|
69820
69906
|
this.forceUpdate();
|
|
69821
69907
|
}
|
|
69822
69908
|
dropNewBlock(event) {
|
|
@@ -69840,10 +69926,9 @@ class GraphEditor extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
|
|
|
69840
69926
|
event.preventDefault();
|
|
69841
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) => {
|
|
69842
69928
|
return this.appendBlock(nodeData.data);
|
|
69843
|
-
} }) })), (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" }))] })));
|
|
69844
69930
|
}
|
|
69845
69931
|
}
|
|
69846
|
-
GraphEditor.NodeWidth = 100;
|
|
69847
69932
|
|
|
69848
69933
|
|
|
69849
69934
|
/***/ }),
|
|
@@ -70926,13 +71011,13 @@ class FramePropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Compo
|
|
|
70926
71011
|
configurableInputBlocks = configurableInputBlocks.sort((a, b) => {
|
|
70927
71012
|
return a.name.localeCompare(b.name);
|
|
70928
71013
|
});
|
|
70929
|
-
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: () => {
|
|
70930
71015
|
this.props.frame.isCollapsed = true;
|
|
70931
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: () => {
|
|
70932
71017
|
this.props.frame.isCollapsed = false;
|
|
70933
71018
|
} })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_buttonLineComponent__WEBPACK_IMPORTED_MODULE_6__.ButtonLineComponent, { label: "Export", onClick: () => {
|
|
70934
71019
|
this.props.frame.export();
|
|
70935
|
-
} })] })), (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 })] })] })));
|
|
70936
71021
|
}
|
|
70937
71022
|
}
|
|
70938
71023
|
|
|
@@ -70955,15 +71040,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
70955
71040
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "../../../../node_modules/react/jsx-runtime.js");
|
|
70956
71041
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "../../../../node_modules/react/index.js");
|
|
70957
71042
|
/* harmony import */ var _sharedComponents_lineContainerComponent__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../sharedComponents/lineContainerComponent */ "../../../tools/nodeEditor/dist/sharedComponents/lineContainerComponent.js");
|
|
70958
|
-
/* harmony import */ var
|
|
70959
|
-
/* harmony import */ var
|
|
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
|
|
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");
|
|
70967
71052
|
|
|
70968
71053
|
|
|
70969
71054
|
|
|
@@ -70990,22 +71075,22 @@ class GeneralPropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Com
|
|
|
70990
71075
|
}
|
|
70991
71076
|
render() {
|
|
70992
71077
|
const targetOptions = [
|
|
70993
|
-
{ label: "Neutral", value:
|
|
70994
|
-
{ label: "Vertex", value:
|
|
70995
|
-
{ 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 },
|
|
70996
71081
|
];
|
|
70997
71082
|
const block = this.props.nodeData.data;
|
|
70998
|
-
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) => {
|
|
70999
71084
|
if (!block.validateBlockName(newName)) {
|
|
71000
71085
|
this.props.stateManager.onErrorMessageDialogRequiredObservable.notifyObservers(`"${newName}" is a reserved name, please choose another`);
|
|
71001
71086
|
return false;
|
|
71002
71087
|
}
|
|
71003
71088
|
return true;
|
|
71004
|
-
} })), 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: () => {
|
|
71005
71090
|
this.forceUpdate();
|
|
71006
71091
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(block);
|
|
71007
71092
|
this.props.stateManager.onRebuildRequiredObservable.notifyObservers(true);
|
|
71008
|
-
} })), !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) })] })) }));
|
|
71009
71094
|
}
|
|
71010
71095
|
}
|
|
71011
71096
|
class GenericPropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
|
|
@@ -71039,30 +71124,30 @@ class GenericPropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Com
|
|
|
71039
71124
|
groups.push(groupName);
|
|
71040
71125
|
}
|
|
71041
71126
|
switch (type) {
|
|
71042
|
-
case
|
|
71043
|
-
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) }));
|
|
71044
71129
|
break;
|
|
71045
71130
|
}
|
|
71046
|
-
case
|
|
71131
|
+
case core_Materials_Node_nodeMaterialDecorator__WEBPACK_IMPORTED_MODULE_4__.PropertyTypeForEdition.Float: {
|
|
71047
71132
|
const cantDisplaySlider = isNaN(options.min) || isNaN(options.max) || options.min === options.max;
|
|
71048
71133
|
if (cantDisplaySlider) {
|
|
71049
|
-
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) }));
|
|
71050
71135
|
}
|
|
71051
71136
|
else {
|
|
71052
|
-
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) }));
|
|
71053
71138
|
}
|
|
71054
71139
|
break;
|
|
71055
71140
|
}
|
|
71056
|
-
case
|
|
71057
|
-
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) }));
|
|
71058
71143
|
break;
|
|
71059
71144
|
}
|
|
71060
|
-
case
|
|
71061
|
-
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) }));
|
|
71062
71147
|
break;
|
|
71063
71148
|
}
|
|
71064
|
-
case
|
|
71065
|
-
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) }));
|
|
71066
71151
|
break;
|
|
71067
71152
|
}
|
|
71068
71153
|
}
|
|
@@ -71217,9 +71302,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
71217
71302
|
/* harmony import */ var core_Maths_math_color__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core/Maths/math.color */ "core/Misc/dataStorage");
|
|
71218
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__);
|
|
71219
71304
|
/* harmony import */ var _sharedComponents_colorPickerComponent__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../sharedComponents/colorPickerComponent */ "../../../tools/nodeEditor/dist/sharedComponents/colorPickerComponent.js");
|
|
71220
|
-
/* harmony import */ var
|
|
71221
|
-
/* harmony import */ var
|
|
71222
|
-
/* 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");
|
|
71223
71308
|
|
|
71224
71309
|
|
|
71225
71310
|
|
|
@@ -71249,14 +71334,14 @@ class GradientStepComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component
|
|
|
71249
71334
|
const step = this.props.step;
|
|
71250
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) => {
|
|
71251
71336
|
this.updateColor(color);
|
|
71252
|
-
} }) })), (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: () => {
|
|
71253
71338
|
this.props.onUpdateStep();
|
|
71254
71339
|
this.props.onCheckForReOrder();
|
|
71255
71340
|
this.forceUpdate();
|
|
71256
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: () => {
|
|
71257
71342
|
if (this.props.onCopy)
|
|
71258
71343
|
this.props.onCopy();
|
|
71259
|
-
}, 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__ }) }))] })));
|
|
71260
71345
|
}
|
|
71261
71346
|
}
|
|
71262
71347
|
|
|
@@ -71282,11 +71367,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
71282
71367
|
/* harmony import */ var _sharedComponents_lineContainerComponent__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../sharedComponents/lineContainerComponent */ "../../../tools/nodeEditor/dist/sharedComponents/lineContainerComponent.js");
|
|
71283
71368
|
/* harmony import */ var _sharedComponents_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../sharedComponents/checkBoxLineComponent */ "../../../tools/nodeEditor/dist/sharedComponents/checkBoxLineComponent.js");
|
|
71284
71369
|
/* harmony import */ var _genericNodePropertyComponent__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./genericNodePropertyComponent */ "../../../tools/nodeEditor/dist/graphSystem/properties/genericNodePropertyComponent.js");
|
|
71285
|
-
/* harmony import */ var
|
|
71286
|
-
/* harmony import */ var
|
|
71287
|
-
/* harmony import */ var
|
|
71288
|
-
/* harmony import */ var
|
|
71289
|
-
/* 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");
|
|
71290
71375
|
|
|
71291
71376
|
|
|
71292
71377
|
|
|
@@ -71400,7 +71485,7 @@ class ImageSourcePropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__
|
|
|
71400
71485
|
{ label: "Linear/Nearest & linear mip", value: core_Misc_tools__WEBPACK_IMPORTED_MODULE_3__.Texture.LINEAR_NEAREST_MIPLINEAR },
|
|
71401
71486
|
{ label: "Linear/Nearest & nearest mip", value: core_Misc_tools__WEBPACK_IMPORTED_MODULE_3__.Texture.LINEAR_NEAREST_MIPNEAREST }, // 9
|
|
71402
71487
|
];
|
|
71403
|
-
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) => {
|
|
71404
71489
|
texture.updateSamplingMode(value);
|
|
71405
71490
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(block);
|
|
71406
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) => {
|
|
@@ -71409,25 +71494,25 @@ class ImageSourcePropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__
|
|
|
71409
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) => {
|
|
71410
71495
|
texture.wrapV = value ? core_Misc_tools__WEBPACK_IMPORTED_MODULE_3__.Texture.CLAMP_ADDRESSMODE : core_Misc_tools__WEBPACK_IMPORTED_MODULE_3__.Texture.WRAP_ADDRESSMODE;
|
|
71411
71496
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(block);
|
|
71412
|
-
} })), 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: () => {
|
|
71413
71498
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(block);
|
|
71414
|
-
} })), 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: () => {
|
|
71415
71500
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(block);
|
|
71416
|
-
} })), 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: () => {
|
|
71417
71502
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(block);
|
|
71418
|
-
} })), 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: () => {
|
|
71419
71504
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(block);
|
|
71420
|
-
} })), 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: () => {
|
|
71421
71506
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(block);
|
|
71422
|
-
} })), 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: () => {
|
|
71423
71508
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(block);
|
|
71424
|
-
} })), 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: () => {
|
|
71425
71510
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(block);
|
|
71426
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) => {
|
|
71427
71512
|
this.setState({ isEmbedded: value });
|
|
71428
71513
|
this.imageSourceBlock.texture = null;
|
|
71429
71514
|
this.updateAfterTextureLoad();
|
|
71430
|
-
} }), 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 })] }));
|
|
71431
71516
|
}
|
|
71432
71517
|
}
|
|
71433
71518
|
|
|
@@ -71447,22 +71532,22 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
71447
71532
|
/* harmony export */ });
|
|
71448
71533
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "../../../../node_modules/react/jsx-runtime.js");
|
|
71449
71534
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "../../../../node_modules/react/index.js");
|
|
71450
|
-
/* harmony import */ var
|
|
71451
|
-
/* harmony import */ var
|
|
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
|
|
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");
|
|
71466
71551
|
|
|
71467
71552
|
|
|
71468
71553
|
|
|
@@ -71503,9 +71588,9 @@ class InputPropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Compo
|
|
|
71503
71588
|
renderValue(globalState) {
|
|
71504
71589
|
const inputBlock = this.props.nodeData.data;
|
|
71505
71590
|
switch (inputBlock.type) {
|
|
71506
|
-
case
|
|
71591
|
+
case core_Materials_Node_Enums_nodeMaterialBlockConnectionPointTypes__WEBPACK_IMPORTED_MODULE_9__.NodeMaterialBlockConnectionPointTypes.Float: {
|
|
71507
71592
|
const cantDisplaySlider = isNaN(inputBlock.min) || isNaN(inputBlock.max) || inputBlock.min === inputBlock.max;
|
|
71508
|
-
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: () => {
|
|
71509
71594
|
return inputBlock.value === 1;
|
|
71510
71595
|
}, onSelect: (value) => {
|
|
71511
71596
|
inputBlock.value = value ? 1 : 0;
|
|
@@ -71513,7 +71598,7 @@ class InputPropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Compo
|
|
|
71513
71598
|
this.props.stateManager.onRebuildRequiredObservable.notifyObservers(true);
|
|
71514
71599
|
}
|
|
71515
71600
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(inputBlock);
|
|
71516
|
-
} })), !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: () => {
|
|
71517
71602
|
if (inputBlock.value < inputBlock.min) {
|
|
71518
71603
|
inputBlock.value = inputBlock.min;
|
|
71519
71604
|
if (inputBlock.isConstant) {
|
|
@@ -71521,7 +71606,7 @@ class InputPropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Compo
|
|
|
71521
71606
|
}
|
|
71522
71607
|
}
|
|
71523
71608
|
this.forceUpdate();
|
|
71524
|
-
} })), !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: () => {
|
|
71525
71610
|
if (inputBlock.value > inputBlock.max) {
|
|
71526
71611
|
inputBlock.value = inputBlock.max;
|
|
71527
71612
|
if (inputBlock.isConstant) {
|
|
@@ -71529,33 +71614,33 @@ class InputPropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Compo
|
|
|
71529
71614
|
}
|
|
71530
71615
|
}
|
|
71531
71616
|
this.forceUpdate();
|
|
71532
|
-
} })), !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: () => {
|
|
71533
71618
|
if (inputBlock.isConstant) {
|
|
71534
71619
|
this.props.stateManager.onRebuildRequiredObservable.notifyObservers(true);
|
|
71535
71620
|
}
|
|
71536
71621
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(inputBlock);
|
|
71537
71622
|
} }))] }));
|
|
71538
71623
|
}
|
|
71539
|
-
case
|
|
71540
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
71541
|
-
case
|
|
71542
|
-
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: () => {
|
|
71543
71628
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(inputBlock);
|
|
71544
|
-
} }), (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: () => {
|
|
71545
71630
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(inputBlock);
|
|
71546
71631
|
} })] }));
|
|
71547
|
-
case
|
|
71548
|
-
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: () => {
|
|
71549
71634
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(inputBlock);
|
|
71550
|
-
} }), (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: () => {
|
|
71551
71636
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(inputBlock);
|
|
71552
71637
|
} })] }));
|
|
71553
|
-
case
|
|
71554
|
-
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
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)(
|
|
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 });
|
|
71559
71644
|
}
|
|
71560
71645
|
return null;
|
|
71561
71646
|
}
|
|
@@ -71569,36 +71654,36 @@ class InputPropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Compo
|
|
|
71569
71654
|
let attributeOptions = [];
|
|
71570
71655
|
let animationOptions = [];
|
|
71571
71656
|
switch (inputBlock.type) {
|
|
71572
|
-
case
|
|
71657
|
+
case core_Materials_Node_Enums_nodeMaterialBlockConnectionPointTypes__WEBPACK_IMPORTED_MODULE_9__.NodeMaterialBlockConnectionPointTypes.Float:
|
|
71573
71658
|
animationOptions = [
|
|
71574
|
-
{ label: "None", value:
|
|
71575
|
-
{ 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 },
|
|
71576
71661
|
];
|
|
71577
71662
|
systemValuesOptions = [
|
|
71578
|
-
{ label: "Delta time", value:
|
|
71579
|
-
{ 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 },
|
|
71580
71665
|
];
|
|
71581
71666
|
break;
|
|
71582
|
-
case
|
|
71667
|
+
case core_Materials_Node_Enums_nodeMaterialBlockConnectionPointTypes__WEBPACK_IMPORTED_MODULE_9__.NodeMaterialBlockConnectionPointTypes.Matrix:
|
|
71583
71668
|
systemValuesOptions = [
|
|
71584
|
-
{ label: "World", value:
|
|
71585
|
-
{ label: "World x View", value:
|
|
71586
|
-
{ label: "World x View x Projection", value:
|
|
71587
|
-
{ label: "View", value:
|
|
71588
|
-
{ label: "View x Projection", value:
|
|
71589
|
-
{ 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 },
|
|
71590
71675
|
];
|
|
71591
71676
|
break;
|
|
71592
|
-
case
|
|
71593
|
-
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 }];
|
|
71594
71679
|
break;
|
|
71595
|
-
case
|
|
71680
|
+
case core_Materials_Node_Enums_nodeMaterialBlockConnectionPointTypes__WEBPACK_IMPORTED_MODULE_9__.NodeMaterialBlockConnectionPointTypes.Color4:
|
|
71596
71681
|
attributeOptions = [
|
|
71597
71682
|
{ label: "color", value: "color" },
|
|
71598
71683
|
{ label: "Instance Color", value: "instanceColor" },
|
|
71599
71684
|
];
|
|
71600
71685
|
break;
|
|
71601
|
-
case
|
|
71686
|
+
case core_Materials_Node_Enums_nodeMaterialBlockConnectionPointTypes__WEBPACK_IMPORTED_MODULE_9__.NodeMaterialBlockConnectionPointTypes.Vector2:
|
|
71602
71687
|
attributeOptions = [
|
|
71603
71688
|
{ label: "uv", value: "uv" },
|
|
71604
71689
|
{ label: "uv2", value: "uv2" },
|
|
@@ -71608,20 +71693,20 @@ class InputPropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Compo
|
|
|
71608
71693
|
{ label: "uv6", value: "uv6" },
|
|
71609
71694
|
];
|
|
71610
71695
|
break;
|
|
71611
|
-
case
|
|
71612
|
-
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 }];
|
|
71613
71698
|
attributeOptions = [
|
|
71614
71699
|
{ label: "position", value: "position" },
|
|
71615
71700
|
{ label: "normal", value: "normal" },
|
|
71616
71701
|
];
|
|
71617
71702
|
break;
|
|
71618
|
-
case
|
|
71703
|
+
case core_Materials_Node_Enums_nodeMaterialBlockConnectionPointTypes__WEBPACK_IMPORTED_MODULE_9__.NodeMaterialBlockConnectionPointTypes.Vector4:
|
|
71619
71704
|
attributeOptions = [
|
|
71620
71705
|
{ label: "matricesIndices", value: "matricesIndices" },
|
|
71621
71706
|
{ label: "matricesWeights", value: "matricesWeights" },
|
|
71622
71707
|
{ label: "tangent", value: "tangent" },
|
|
71623
71708
|
];
|
|
71624
|
-
systemValuesOptions = [{ label: "Camera parameters", value:
|
|
71709
|
+
systemValuesOptions = [{ label: "Camera parameters", value: core_Materials_Node_Enums_nodeMaterialBlockConnectionPointTypes__WEBPACK_IMPORTED_MODULE_9__.NodeMaterialSystemValues.CameraParameters }];
|
|
71625
71710
|
break;
|
|
71626
71711
|
}
|
|
71627
71712
|
const modeOptions = [{ label: "User-defined", value: 0 }];
|
|
@@ -71636,7 +71721,7 @@ class InputPropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Compo
|
|
|
71636
71721
|
{ label: "Visible in the inspector", value: 1 },
|
|
71637
71722
|
{ label: "Constant", value: 2 },
|
|
71638
71723
|
];
|
|
71639
|
-
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) => {
|
|
71640
71725
|
if (block.visibleInInspector) {
|
|
71641
71726
|
return 1;
|
|
71642
71727
|
}
|
|
@@ -71662,11 +71747,11 @@ class InputPropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Compo
|
|
|
71662
71747
|
this.forceUpdate();
|
|
71663
71748
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(inputBlock);
|
|
71664
71749
|
this.props.stateManager.onRebuildRequiredObservable.notifyObservers(true);
|
|
71665
|
-
}, 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: () => {
|
|
71666
71751
|
this.forceUpdate();
|
|
71667
71752
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(inputBlock);
|
|
71668
71753
|
this.props.stateManager.onRebuildRequiredObservable.notifyObservers(true);
|
|
71669
|
-
} })), (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) => {
|
|
71670
71755
|
if (block.isAttribute) {
|
|
71671
71756
|
return 1;
|
|
71672
71757
|
}
|
|
@@ -71691,24 +71776,24 @@ class InputPropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Compo
|
|
|
71691
71776
|
this.forceUpdate();
|
|
71692
71777
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(inputBlock);
|
|
71693
71778
|
this.props.stateManager.onRebuildRequiredObservable.notifyObservers(true);
|
|
71694
|
-
}, 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) => {
|
|
71695
71780
|
inputBlock.setAsAttribute(value);
|
|
71696
71781
|
this.forceUpdate();
|
|
71697
71782
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(inputBlock);
|
|
71698
71783
|
this.props.stateManager.onRebuildRequiredObservable.notifyObservers(true);
|
|
71699
|
-
} })), 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: () => {
|
|
71700
71785
|
this.forceUpdate();
|
|
71701
71786
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(inputBlock);
|
|
71702
71787
|
this.props.stateManager.onRebuildRequiredObservable.notifyObservers(true);
|
|
71703
71788
|
} })), inputBlock.isUniform &&
|
|
71704
71789
|
!inputBlock.isSystemValue &&
|
|
71705
|
-
inputBlock.animationType ===
|
|
71706
|
-
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) => {
|
|
71707
71792
|
inputBlock.setAsSystemValue(value);
|
|
71708
71793
|
this.forceUpdate();
|
|
71709
71794
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(inputBlock);
|
|
71710
71795
|
this.props.stateManager.onRebuildRequiredObservable.notifyObservers(true);
|
|
71711
|
-
} })), 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" }))] }))] }));
|
|
71712
71797
|
}
|
|
71713
71798
|
}
|
|
71714
71799
|
|
|
@@ -71814,8 +71899,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
71814
71899
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "../../../../node_modules/react/index.js");
|
|
71815
71900
|
/* harmony import */ var _sharedComponents_lineContainerComponent__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../sharedComponents/lineContainerComponent */ "../../../tools/nodeEditor/dist/sharedComponents/lineContainerComponent.js");
|
|
71816
71901
|
/* harmony import */ var _sharedComponents_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../sharedComponents/checkBoxLineComponent */ "../../../tools/nodeEditor/dist/sharedComponents/checkBoxLineComponent.js");
|
|
71817
|
-
/* harmony import */ var
|
|
71818
|
-
/* 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");
|
|
71819
71904
|
|
|
71820
71905
|
|
|
71821
71906
|
|
|
@@ -71834,7 +71919,7 @@ class NodePortPropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Co
|
|
|
71834
71919
|
this.props.stateManager.onExposePortOnFrameObservable.notifyObservers(this.props.nodePort.node);
|
|
71835
71920
|
}
|
|
71836
71921
|
render() {
|
|
71837
|
-
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: " " }));
|
|
71838
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 })) })] })));
|
|
71839
71924
|
}
|
|
71840
71925
|
}
|
|
@@ -71860,12 +71945,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
71860
71945
|
/* harmony import */ var core_Misc_tools__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_Misc_tools__WEBPACK_IMPORTED_MODULE_3__);
|
|
71861
71946
|
/* harmony import */ var _sharedComponents_lineContainerComponent__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../sharedComponents/lineContainerComponent */ "../../../tools/nodeEditor/dist/sharedComponents/lineContainerComponent.js");
|
|
71862
71947
|
/* harmony import */ var _sharedComponents_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../sharedComponents/checkBoxLineComponent */ "../../../tools/nodeEditor/dist/sharedComponents/checkBoxLineComponent.js");
|
|
71863
|
-
/* harmony import */ var
|
|
71864
|
-
/* harmony import */ var
|
|
71865
|
-
/* harmony import */ var
|
|
71866
|
-
/* harmony import */ var
|
|
71867
|
-
/* harmony import */ var
|
|
71868
|
-
/* 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");
|
|
71869
71954
|
|
|
71870
71955
|
|
|
71871
71956
|
|
|
@@ -72058,7 +72143,7 @@ class TexturePropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Com
|
|
|
72058
72143
|
{ label: "Linear/Nearest & linear mip", value: core_Misc_tools__WEBPACK_IMPORTED_MODULE_3__.Texture.LINEAR_NEAREST_MIPLINEAR },
|
|
72059
72144
|
{ label: "Linear/Nearest & nearest mip", value: core_Misc_tools__WEBPACK_IMPORTED_MODULE_3__.Texture.LINEAR_NEAREST_MIPNEAREST }, // 9
|
|
72060
72145
|
];
|
|
72061
|
-
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: () => {
|
|
72062
72147
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(block);
|
|
72063
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: () => {
|
|
72064
72149
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(block);
|
|
@@ -72069,10 +72154,10 @@ class TexturePropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Com
|
|
|
72069
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: () => {
|
|
72070
72155
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(block);
|
|
72071
72156
|
this.props.stateManager.onRebuildRequiredObservable.notifyObservers(true);
|
|
72072
|
-
} }), 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) => {
|
|
72073
72158
|
texture.updateSamplingMode(value);
|
|
72074
72159
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(block);
|
|
72075
|
-
} })), 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) => {
|
|
72076
72161
|
texture.coordinatesMode = value;
|
|
72077
72162
|
this.forceUpdate();
|
|
72078
72163
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(block);
|
|
@@ -72082,25 +72167,25 @@ class TexturePropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Com
|
|
|
72082
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) => {
|
|
72083
72168
|
texture.wrapV = value ? core_Misc_tools__WEBPACK_IMPORTED_MODULE_3__.Texture.CLAMP_ADDRESSMODE : core_Misc_tools__WEBPACK_IMPORTED_MODULE_3__.Texture.WRAP_ADDRESSMODE;
|
|
72084
72169
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(block);
|
|
72085
|
-
} })), 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: () => {
|
|
72086
72171
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(block);
|
|
72087
|
-
} })), 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: () => {
|
|
72088
72173
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(block);
|
|
72089
|
-
} })), 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: () => {
|
|
72090
72175
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(block);
|
|
72091
|
-
} })), 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: () => {
|
|
72092
72177
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(block);
|
|
72093
|
-
} })), 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: () => {
|
|
72094
72179
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(block);
|
|
72095
|
-
} })), 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: () => {
|
|
72096
72181
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(block);
|
|
72097
|
-
} })), 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: () => {
|
|
72098
72183
|
this.props.stateManager.onUpdateRequiredObservable.notifyObservers(block);
|
|
72099
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) => {
|
|
72100
72185
|
this.setState({ isEmbedded: value });
|
|
72101
72186
|
this.textureBlock.texture = null;
|
|
72102
72187
|
this.updateAfterTextureLoad();
|
|
72103
|
-
} }), 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 })] }));
|
|
72104
72189
|
}
|
|
72105
72190
|
}
|
|
72106
72191
|
|
|
@@ -72942,7 +73027,7 @@ class ColorPickerLineComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Compon
|
|
|
72942
73027
|
render() {
|
|
72943
73028
|
const color = this.state.color;
|
|
72944
73029
|
this.props.globalState.lockObject.lock = this.state.pickerEnabled;
|
|
72945
|
-
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) => {
|
|
72946
73031
|
const hex = color.toHexString();
|
|
72947
73032
|
this.props.onColorChanged(hex);
|
|
72948
73033
|
} }) })) })) }))] })));
|
|
@@ -73046,123 +73131,6 @@ class FileButtonLineComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Compone
|
|
|
73046
73131
|
}
|
|
73047
73132
|
|
|
73048
73133
|
|
|
73049
|
-
/***/ }),
|
|
73050
|
-
|
|
73051
|
-
/***/ "../../../tools/nodeEditor/dist/sharedComponents/floatLineComponent.js":
|
|
73052
|
-
/*!*****************************************************************************!*\
|
|
73053
|
-
!*** ../../../tools/nodeEditor/dist/sharedComponents/floatLineComponent.js ***!
|
|
73054
|
-
\*****************************************************************************/
|
|
73055
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
73056
|
-
|
|
73057
|
-
"use strict";
|
|
73058
|
-
__webpack_require__.r(__webpack_exports__);
|
|
73059
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
73060
|
-
/* harmony export */ "FloatLineComponent": () => (/* binding */ FloatLineComponent)
|
|
73061
|
-
/* harmony export */ });
|
|
73062
|
-
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "../../../../node_modules/react/jsx-runtime.js");
|
|
73063
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "../../../../node_modules/react/index.js");
|
|
73064
|
-
|
|
73065
|
-
|
|
73066
|
-
class FloatLineComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
|
|
73067
|
-
constructor(props) {
|
|
73068
|
-
super(props);
|
|
73069
|
-
this._localChange = false;
|
|
73070
|
-
this._onFocus = false;
|
|
73071
|
-
const currentValue = this.props.target[this.props.propertyName];
|
|
73072
|
-
this.state = { value: currentValue ? (this.props.isInteger ? currentValue.toFixed(0) : currentValue.toFixed(this.props.digits || 4)) : "0" };
|
|
73073
|
-
this._store = currentValue;
|
|
73074
|
-
let rexp = "(.*\\.";
|
|
73075
|
-
let numDigits = this.props.digits || 4;
|
|
73076
|
-
while (numDigits--) {
|
|
73077
|
-
rexp += ".";
|
|
73078
|
-
}
|
|
73079
|
-
rexp += ").+";
|
|
73080
|
-
this._regExp = new RegExp(rexp);
|
|
73081
|
-
}
|
|
73082
|
-
shouldComponentUpdate(nextProps, nextState) {
|
|
73083
|
-
if (this._localChange) {
|
|
73084
|
-
this._localChange = false;
|
|
73085
|
-
return true;
|
|
73086
|
-
}
|
|
73087
|
-
const newValue = nextProps.target[nextProps.propertyName];
|
|
73088
|
-
const newValueString = newValue ? (this.props.isInteger ? newValue.toFixed(0) : newValue.toFixed(this.props.digits || 4)) : "0";
|
|
73089
|
-
if (newValueString !== nextState.value) {
|
|
73090
|
-
nextState.value = newValueString;
|
|
73091
|
-
return true;
|
|
73092
|
-
}
|
|
73093
|
-
return false;
|
|
73094
|
-
}
|
|
73095
|
-
componentWillUnmount() {
|
|
73096
|
-
if (this._onFocus) {
|
|
73097
|
-
if (this.props.onEnter) {
|
|
73098
|
-
this.props.onEnter(this._store);
|
|
73099
|
-
}
|
|
73100
|
-
}
|
|
73101
|
-
}
|
|
73102
|
-
raiseOnPropertyChanged(newValue, previousValue) {
|
|
73103
|
-
if (this.props.onChange) {
|
|
73104
|
-
this.props.onChange(newValue);
|
|
73105
|
-
}
|
|
73106
|
-
if (!this.props.onPropertyChangedObservable) {
|
|
73107
|
-
return;
|
|
73108
|
-
}
|
|
73109
|
-
this.props.onPropertyChangedObservable.notifyObservers({
|
|
73110
|
-
object: this.props.target,
|
|
73111
|
-
property: this.props.propertyName,
|
|
73112
|
-
value: newValue,
|
|
73113
|
-
initialValue: previousValue,
|
|
73114
|
-
});
|
|
73115
|
-
}
|
|
73116
|
-
updateValue(valueString) {
|
|
73117
|
-
if (/[^0-9.-]/g.test(valueString)) {
|
|
73118
|
-
return;
|
|
73119
|
-
}
|
|
73120
|
-
valueString = valueString.replace(this._regExp, "$1");
|
|
73121
|
-
let valueAsNumber;
|
|
73122
|
-
if (this.props.isInteger) {
|
|
73123
|
-
valueAsNumber = parseInt(valueString);
|
|
73124
|
-
}
|
|
73125
|
-
else {
|
|
73126
|
-
valueAsNumber = parseFloat(valueString);
|
|
73127
|
-
}
|
|
73128
|
-
this._localChange = true;
|
|
73129
|
-
this.setState({ value: valueString });
|
|
73130
|
-
if (isNaN(valueAsNumber)) {
|
|
73131
|
-
return;
|
|
73132
|
-
}
|
|
73133
|
-
if (this.props.max != undefined && valueAsNumber > this.props.max) {
|
|
73134
|
-
valueAsNumber = this.props.max;
|
|
73135
|
-
}
|
|
73136
|
-
if (this.props.min != undefined && valueAsNumber < this.props.min) {
|
|
73137
|
-
valueAsNumber = this.props.min;
|
|
73138
|
-
}
|
|
73139
|
-
this.props.target[this.props.propertyName] = valueAsNumber;
|
|
73140
|
-
this.raiseOnPropertyChanged(valueAsNumber, this._store);
|
|
73141
|
-
this._store = valueAsNumber;
|
|
73142
|
-
}
|
|
73143
|
-
render() {
|
|
73144
|
-
const className = this.props.smallUI ? "short" : "value";
|
|
73145
|
-
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: () => {
|
|
73146
|
-
this._onFocus = false;
|
|
73147
|
-
this.props.globalState.lockObject.lock = false;
|
|
73148
|
-
if (this.props.onEnter) {
|
|
73149
|
-
this.props.onEnter(this._store);
|
|
73150
|
-
}
|
|
73151
|
-
}, onKeyDown: (evt) => {
|
|
73152
|
-
if (evt.keyCode !== 13) {
|
|
73153
|
-
return;
|
|
73154
|
-
}
|
|
73155
|
-
if (this.props.onEnter) {
|
|
73156
|
-
this.props.onEnter(this._store);
|
|
73157
|
-
}
|
|
73158
|
-
}, onFocus: () => {
|
|
73159
|
-
this.props.globalState.lockObject.lock = true;
|
|
73160
|
-
this._onFocus = true;
|
|
73161
|
-
}, value: this.state.value, onChange: (evt) => this.updateValue(evt.target.value) }) }))] })) }));
|
|
73162
|
-
}
|
|
73163
|
-
}
|
|
73164
|
-
|
|
73165
|
-
|
|
73166
73134
|
/***/ }),
|
|
73167
73135
|
|
|
73168
73136
|
/***/ "../../../tools/nodeEditor/dist/sharedComponents/lineContainerComponent.js":
|
|
@@ -73368,142 +73336,6 @@ class Popup {
|
|
|
73368
73336
|
}
|
|
73369
73337
|
|
|
73370
73338
|
|
|
73371
|
-
/***/ }),
|
|
73372
|
-
|
|
73373
|
-
/***/ "../../../tools/nodeEditor/dist/sharedComponents/sliderLineComponent.js":
|
|
73374
|
-
/*!******************************************************************************!*\
|
|
73375
|
-
!*** ../../../tools/nodeEditor/dist/sharedComponents/sliderLineComponent.js ***!
|
|
73376
|
-
\******************************************************************************/
|
|
73377
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
73378
|
-
|
|
73379
|
-
"use strict";
|
|
73380
|
-
__webpack_require__.r(__webpack_exports__);
|
|
73381
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
73382
|
-
/* harmony export */ "SliderLineComponent": () => (/* binding */ SliderLineComponent)
|
|
73383
|
-
/* harmony export */ });
|
|
73384
|
-
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "../../../../node_modules/react/jsx-runtime.js");
|
|
73385
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "../../../../node_modules/react/index.js");
|
|
73386
|
-
/* harmony import */ var core_Misc_tools__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! core/Misc/tools */ "core/Misc/dataStorage");
|
|
73387
|
-
/* harmony import */ var core_Misc_tools__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_Misc_tools__WEBPACK_IMPORTED_MODULE_2__);
|
|
73388
|
-
/* harmony import */ var _floatLineComponent__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./floatLineComponent */ "../../../tools/nodeEditor/dist/sharedComponents/floatLineComponent.js");
|
|
73389
|
-
|
|
73390
|
-
|
|
73391
|
-
|
|
73392
|
-
|
|
73393
|
-
class SliderLineComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
|
|
73394
|
-
constructor(props) {
|
|
73395
|
-
super(props);
|
|
73396
|
-
this._localChange = false;
|
|
73397
|
-
if (this.props.directValue !== undefined) {
|
|
73398
|
-
this.state = {
|
|
73399
|
-
value: this.props.directValue,
|
|
73400
|
-
};
|
|
73401
|
-
}
|
|
73402
|
-
else {
|
|
73403
|
-
let value = this.props.target[this.props.propertyName];
|
|
73404
|
-
if (value === undefined) {
|
|
73405
|
-
value = this.props.maximum;
|
|
73406
|
-
}
|
|
73407
|
-
this.state = { value: value };
|
|
73408
|
-
}
|
|
73409
|
-
}
|
|
73410
|
-
shouldComponentUpdate(nextProps, nextState) {
|
|
73411
|
-
if (nextProps.directValue !== undefined) {
|
|
73412
|
-
nextState.value = nextProps.directValue;
|
|
73413
|
-
return true;
|
|
73414
|
-
}
|
|
73415
|
-
let currentState = nextProps.target[nextProps.propertyName];
|
|
73416
|
-
if (currentState === undefined) {
|
|
73417
|
-
currentState = nextProps.maximum;
|
|
73418
|
-
}
|
|
73419
|
-
if (currentState !== nextState.value || nextProps.minimum !== this.props.minimum || nextProps.maximum !== this.props.maximum || this._localChange) {
|
|
73420
|
-
nextState.value = Math.min(Math.max(currentState, nextProps.minimum), nextProps.maximum);
|
|
73421
|
-
this._localChange = false;
|
|
73422
|
-
return true;
|
|
73423
|
-
}
|
|
73424
|
-
return false;
|
|
73425
|
-
}
|
|
73426
|
-
onChange(newValueString) {
|
|
73427
|
-
this._localChange = true;
|
|
73428
|
-
let newValue = parseFloat(newValueString);
|
|
73429
|
-
if (this.props.useEuler) {
|
|
73430
|
-
newValue = core_Misc_tools__WEBPACK_IMPORTED_MODULE_2__.Tools.ToRadians(newValue);
|
|
73431
|
-
}
|
|
73432
|
-
if (this.props.target) {
|
|
73433
|
-
if (this.props.onPropertyChangedObservable) {
|
|
73434
|
-
this.props.onPropertyChangedObservable.notifyObservers({
|
|
73435
|
-
object: this.props.target,
|
|
73436
|
-
property: this.props.propertyName,
|
|
73437
|
-
value: newValue,
|
|
73438
|
-
initialValue: this.state.value,
|
|
73439
|
-
});
|
|
73440
|
-
}
|
|
73441
|
-
this.props.target[this.props.propertyName] = newValue;
|
|
73442
|
-
}
|
|
73443
|
-
if (this.props.onChange) {
|
|
73444
|
-
this.props.onChange(newValue);
|
|
73445
|
-
}
|
|
73446
|
-
this.setState({ value: newValue });
|
|
73447
|
-
}
|
|
73448
|
-
onInput(newValueString) {
|
|
73449
|
-
const newValue = parseFloat(newValueString);
|
|
73450
|
-
if (this.props.onInput) {
|
|
73451
|
-
this.props.onInput(newValue);
|
|
73452
|
-
}
|
|
73453
|
-
}
|
|
73454
|
-
prepareDataToRead(value) {
|
|
73455
|
-
if (this.props.useEuler) {
|
|
73456
|
-
return core_Misc_tools__WEBPACK_IMPORTED_MODULE_2__.Tools.ToDegrees(value);
|
|
73457
|
-
}
|
|
73458
|
-
return value;
|
|
73459
|
-
}
|
|
73460
|
-
render() {
|
|
73461
|
-
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: () => {
|
|
73462
|
-
this.onChange(this.state.value);
|
|
73463
|
-
} }), (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) }) }))] })));
|
|
73464
|
-
}
|
|
73465
|
-
}
|
|
73466
|
-
|
|
73467
|
-
|
|
73468
|
-
/***/ }),
|
|
73469
|
-
|
|
73470
|
-
/***/ "../../../tools/nodeEditor/dist/sharedComponents/textLineComponent.js":
|
|
73471
|
-
/*!****************************************************************************!*\
|
|
73472
|
-
!*** ../../../tools/nodeEditor/dist/sharedComponents/textLineComponent.js ***!
|
|
73473
|
-
\****************************************************************************/
|
|
73474
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
73475
|
-
|
|
73476
|
-
"use strict";
|
|
73477
|
-
__webpack_require__.r(__webpack_exports__);
|
|
73478
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
73479
|
-
/* harmony export */ "TextLineComponent": () => (/* binding */ TextLineComponent)
|
|
73480
|
-
/* harmony export */ });
|
|
73481
|
-
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ "../../../../node_modules/react/jsx-runtime.js");
|
|
73482
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "../../../../node_modules/react/index.js");
|
|
73483
|
-
|
|
73484
|
-
|
|
73485
|
-
class TextLineComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component {
|
|
73486
|
-
constructor(props) {
|
|
73487
|
-
super(props);
|
|
73488
|
-
}
|
|
73489
|
-
onLink() {
|
|
73490
|
-
if (!this.props.onLink) {
|
|
73491
|
-
return;
|
|
73492
|
-
}
|
|
73493
|
-
this.props.onLink();
|
|
73494
|
-
}
|
|
73495
|
-
renderContent() {
|
|
73496
|
-
if (this.props.onLink) {
|
|
73497
|
-
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" })));
|
|
73498
|
-
}
|
|
73499
|
-
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" })));
|
|
73500
|
-
}
|
|
73501
|
-
render() {
|
|
73502
|
-
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()] })));
|
|
73503
|
-
}
|
|
73504
|
-
}
|
|
73505
|
-
|
|
73506
|
-
|
|
73507
73339
|
/***/ }),
|
|
73508
73340
|
|
|
73509
73341
|
/***/ "../../../tools/nodeEditor/dist/sharedComponents/textureLineComponent.js":
|