@babylonjs/node-editor 6.22.1 → 6.23.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -56928,7 +56928,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
56928
56928
|
/* harmony import */ var _svgs_omni_svg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./svgs/omni.svg */ "../../../tools/nodeEditor/dist/components/preview/svgs/omni.svg");
|
56929
56929
|
/* harmony import */ var _svgs_directionalRight_svg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./svgs/directionalRight.svg */ "../../../tools/nodeEditor/dist/components/preview/svgs/directionalRight.svg");
|
56930
56930
|
/* harmony import */ var _svgs_directionalLeft_svg__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./svgs/directionalLeft.svg */ "../../../tools/nodeEditor/dist/components/preview/svgs/directionalLeft.svg");
|
56931
|
-
/* harmony import */ var
|
56931
|
+
/* harmony import */ var _svgs_icon_ibl_svg__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./svgs/icon-ibl.svg */ "../../../tools/nodeEditor/dist/components/preview/svgs/icon-ibl.svg");
|
56932
|
+
/* 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");
|
56933
|
+
|
56932
56934
|
|
56933
56935
|
|
56934
56936
|
|
@@ -56988,7 +56990,7 @@ class PreviewAreaComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component
|
|
56988
56990
|
{ label: "OneOne", value: core_Misc_dataStorage__WEBPACK_IMPORTED_MODULE_2__.ParticleSystem.BLENDMODE_ONEONE },
|
56989
56991
|
{ label: "Standard", value: core_Misc_dataStorage__WEBPACK_IMPORTED_MODULE_2__.ParticleSystem.BLENDMODE_STANDARD },
|
56990
56992
|
];
|
56991
|
-
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__.jsxs)("div", { id: "preview", style: { height: this.props.width + "px" }, children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("canvas", { onPointerOver: this._onPointerOverCanvas, onPointerOut: this._onPointerOutCanvas, id: "preview-canvas" }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "waitPanel" + (this.state.isLoading ? "" : " hidden"), children: "Please wait, loading..." })] }), this.props.globalState.mode === core_Misc_dataStorage__WEBPACK_IMPORTED_MODULE_2__.NodeMaterialModes.Particle && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { id: "preview-config-bar", className: "extended", children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
56993
|
+
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__.jsxs)("div", { id: "preview", style: { height: this.props.width + "px" }, children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("canvas", { onPointerOver: this._onPointerOverCanvas, onPointerOut: this._onPointerOutCanvas, id: "preview-canvas" }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "waitPanel" + (this.state.isLoading ? "" : " hidden"), children: "Please wait, loading..." })] }), this.props.globalState.mode === core_Misc_dataStorage__WEBPACK_IMPORTED_MODULE_2__.NodeMaterialModes.Particle && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { id: "preview-config-bar", className: "extended", children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_optionsLineComponent__WEBPACK_IMPORTED_MODULE_9__.OptionsLineComponent, { label: "Blend mode", options: blendModeOptions, target: this.props.globalState, propertyName: "particleSystemBlendMode", noDirectUpdate: true, onSelect: (value) => {
|
56992
56994
|
this.changeParticleSystemBlendMode(value);
|
56993
56995
|
} }) })), this.props.globalState.mode === core_Misc_dataStorage__WEBPACK_IMPORTED_MODULE_2__.NodeMaterialModes.Material && ((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", { id: "preview-config-bar", children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { title: "Render without back face culling", onClick: () => this.changeBackFaceCulling(!this.props.globalState.backFaceCulling), className: "button back-face" + (!this.props.globalState.backFaceCulling ? " selected" : ""), children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("img", { src: _svgs_doubleSided_svg__WEBPACK_IMPORTED_MODULE_3__, alt: "" }) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { title: "Render with depth pre-pass", onClick: () => this.changeDepthPrePass(!this.props.globalState.depthPrePass), className: "button depth-pass" + (this.props.globalState.depthPrePass ? " selected" : ""), children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("img", { src: _svgs_depthPass_svg__WEBPACK_IMPORTED_MODULE_4__, alt: "" }) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { title: "Turn on/off hemispheric light", onClick: () => {
|
56994
56996
|
this.props.globalState.hemisphericLight = !this.props.globalState.hemisphericLight;
|
@@ -57005,7 +57007,12 @@ class PreviewAreaComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component
|
|
57005
57007
|
core_Misc_dataStorage__WEBPACK_IMPORTED_MODULE_2__.DataStorage.WriteBoolean("DirectionalLight0", this.props.globalState.directionalLight0);
|
57006
57008
|
this.props.globalState.onLightUpdated.notifyObservers();
|
57007
57009
|
this.forceUpdate();
|
57008
|
-
}, className: "button direction-light-0" + (this.props.globalState.directionalLight0 ? " selected" : ""), children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("img", { src: _svgs_directionalLeft_svg__WEBPACK_IMPORTED_MODULE_7__, alt: "" }) })
|
57010
|
+
}, className: "button direction-light-0" + (this.props.globalState.directionalLight0 ? " selected" : ""), children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("img", { src: _svgs_directionalLeft_svg__WEBPACK_IMPORTED_MODULE_7__, alt: "" }) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { title: "Turn on/off environment", onClick: () => {
|
57011
|
+
this.props.globalState.backgroundHDR = !this.props.globalState.backgroundHDR;
|
57012
|
+
core_Misc_dataStorage__WEBPACK_IMPORTED_MODULE_2__.DataStorage.WriteBoolean("backgroundHDR", this.props.globalState.backgroundHDR);
|
57013
|
+
this.props.globalState.onBackgroundHDRUpdated.notifyObservers();
|
57014
|
+
this.forceUpdate();
|
57015
|
+
}, className: "button " + (this.props.globalState.backgroundHDR ? " selected" : ""), children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("img", { src: _svgs_icon_ibl_svg__WEBPACK_IMPORTED_MODULE_8__, alt: "" }) })] }) }))] }));
|
57009
57016
|
}
|
57010
57017
|
}
|
57011
57018
|
|
@@ -57051,10 +57058,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
57051
57058
|
|
57052
57059
|
|
57053
57060
|
|
57061
|
+
|
57062
|
+
|
57054
57063
|
|
57055
57064
|
|
57056
57065
|
|
57057
57066
|
const dontSerializeTextureContent = true;
|
57067
|
+
/**
|
57068
|
+
*
|
57069
|
+
*/
|
57058
57070
|
class PreviewManager {
|
57059
57071
|
_serializeMaterial() {
|
57060
57072
|
const nodeMaterial = this._nodeMaterial;
|
@@ -57105,6 +57117,9 @@ class PreviewManager {
|
|
57105
57117
|
this._onLightUpdatedObserver = globalState.onLightUpdated.add(() => {
|
57106
57118
|
this._prepareLights();
|
57107
57119
|
});
|
57120
|
+
this._onBackgroundHDRUpdatedObserver = globalState.onBackgroundHDRUpdated.add(() => {
|
57121
|
+
this._prepareBackgroundHDR();
|
57122
|
+
});
|
57108
57123
|
this._onUpdateRequiredObserver = globalState.stateManager.onUpdateRequiredObservable.add(() => {
|
57109
57124
|
this._updatePreview();
|
57110
57125
|
});
|
@@ -57179,6 +57194,7 @@ class PreviewManager {
|
|
57179
57194
|
});
|
57180
57195
|
}
|
57181
57196
|
_reset() {
|
57197
|
+
this._globalState.envType = _previewType__WEBPACK_IMPORTED_MODULE_1__.PreviewType.Room;
|
57182
57198
|
this._globalState.previewType = _previewType__WEBPACK_IMPORTED_MODULE_1__.PreviewType.Box;
|
57183
57199
|
this._globalState.listOfCustomPreviewFiles = [];
|
57184
57200
|
this._scene.meshes.forEach((m) => m.dispose());
|
@@ -57225,11 +57241,26 @@ class PreviewManager {
|
|
57225
57241
|
dir1.parent = this._lightParent;
|
57226
57242
|
}
|
57227
57243
|
}
|
57244
|
+
_prepareBackgroundHDR() {
|
57245
|
+
this._scene.environmentTexture = null;
|
57246
|
+
if (this._hdrSkyBox) {
|
57247
|
+
this._scene.removeMesh(this._hdrSkyBox);
|
57248
|
+
}
|
57249
|
+
if (this._globalState.backgroundHDR) {
|
57250
|
+
this._scene.environmentTexture = this._hdrTexture;
|
57251
|
+
this._hdrSkyBox = this._scene.createDefaultSkybox(this._hdrTexture);
|
57252
|
+
}
|
57253
|
+
this._updatePreview();
|
57254
|
+
}
|
57228
57255
|
_prepareScene() {
|
57229
57256
|
this._camera.useFramingBehavior = this._globalState.mode === core_Materials_Node_nodeMaterial__WEBPACK_IMPORTED_MODULE_0__.NodeMaterialModes.Material;
|
57230
57257
|
switch (this._globalState.mode) {
|
57231
57258
|
case core_Materials_Node_nodeMaterial__WEBPACK_IMPORTED_MODULE_0__.NodeMaterialModes.Material: {
|
57232
57259
|
this._prepareLights();
|
57260
|
+
if (!this._globalState.envFile) {
|
57261
|
+
this._globalState.backgroundHDR = false;
|
57262
|
+
}
|
57263
|
+
this._prepareBackgroundHDR();
|
57233
57264
|
const framingBehavior = this._camera.getBehaviorByName("Framing");
|
57234
57265
|
setTimeout(() => {
|
57235
57266
|
// Let the behavior activate first
|
@@ -57267,6 +57298,25 @@ class PreviewManager {
|
|
57267
57298
|
this._updatePreview();
|
57268
57299
|
}
|
57269
57300
|
_refreshPreviewMesh(force) {
|
57301
|
+
switch (this._globalState.envType) {
|
57302
|
+
case _previewType__WEBPACK_IMPORTED_MODULE_1__.PreviewType.Room:
|
57303
|
+
this._hdrTexture = new core_Materials_Node_nodeMaterial__WEBPACK_IMPORTED_MODULE_0__.CubeTexture(PreviewManager.DefaultEnvironmentURL, this._scene);
|
57304
|
+
if (this._hdrTexture) {
|
57305
|
+
this._prepareBackgroundHDR();
|
57306
|
+
}
|
57307
|
+
break;
|
57308
|
+
case _previewType__WEBPACK_IMPORTED_MODULE_1__.PreviewType.Custom: {
|
57309
|
+
const blob = new Blob([this._globalState.envFile], { type: "octet/stream" });
|
57310
|
+
const reader = new FileReader();
|
57311
|
+
reader.onload = (evt) => {
|
57312
|
+
const dataurl = evt.target.result;
|
57313
|
+
this._hdrTexture = new core_Materials_Node_nodeMaterial__WEBPACK_IMPORTED_MODULE_0__.CubeTexture(dataurl, this._scene, undefined, false, undefined, undefined, undefined, undefined, undefined, ".env");
|
57314
|
+
this._prepareBackgroundHDR();
|
57315
|
+
};
|
57316
|
+
reader.readAsDataURL(blob);
|
57317
|
+
break;
|
57318
|
+
}
|
57319
|
+
}
|
57270
57320
|
if (this._currentType !== this._globalState.previewType || this._currentType === _previewType__WEBPACK_IMPORTED_MODULE_1__.PreviewType.Custom || force) {
|
57271
57321
|
this._currentType = this._globalState.previewType;
|
57272
57322
|
if (this._meshes && this._meshes.length) {
|
@@ -57537,6 +57587,7 @@ class PreviewManager {
|
|
57537
57587
|
this._globalState.onBackFaceCullingChanged.remove(this._onBackFaceCullingChangedObserver);
|
57538
57588
|
this._globalState.onDepthPrePassChanged.remove(this._onDepthPrePassChangedObserver);
|
57539
57589
|
this._globalState.onLightUpdated.remove(this._onLightUpdatedObserver);
|
57590
|
+
this._globalState.onBackgroundHDRUpdated.remove(this._onBackgroundHDRUpdatedObserver);
|
57540
57591
|
if (this._material) {
|
57541
57592
|
this._material.dispose(false, true);
|
57542
57593
|
}
|
@@ -57548,6 +57599,10 @@ class PreviewManager {
|
|
57548
57599
|
this._engine.dispose();
|
57549
57600
|
}
|
57550
57601
|
}
|
57602
|
+
/**
|
57603
|
+
* Default Environment URL
|
57604
|
+
*/
|
57605
|
+
PreviewManager.DefaultEnvironmentURL = "https://assets.babylonjs.com/environments/environmentSpecular.env";
|
57551
57606
|
|
57552
57607
|
|
57553
57608
|
/***/ }),
|
@@ -57570,9 +57625,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
57570
57625
|
/* harmony import */ var _previewType__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./previewType */ "../../../tools/nodeEditor/dist/components/preview/previewType.js");
|
57571
57626
|
/* harmony import */ var _svgs_popOut_svg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./svgs/popOut.svg */ "../../../tools/nodeEditor/dist/components/preview/svgs/popOut.svg");
|
57572
57627
|
/* harmony import */ var _svgs_colorPicker_svg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./svgs/colorPicker.svg */ "../../../tools/nodeEditor/dist/components/preview/svgs/colorPicker.svg");
|
57573
|
-
/* harmony import */ var
|
57574
|
-
/* harmony import */ var
|
57575
|
-
/* harmony import */ var
|
57628
|
+
/* harmony import */ var _svgs_envPicker_svg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./svgs/envPicker.svg */ "../../../tools/nodeEditor/dist/components/preview/svgs/envPicker.svg");
|
57629
|
+
/* harmony import */ var _svgs_pauseIcon_svg__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./svgs/pauseIcon.svg */ "../../../tools/nodeEditor/dist/components/preview/svgs/pauseIcon.svg");
|
57630
|
+
/* harmony import */ var _svgs_playIcon_svg__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./svgs/playIcon.svg */ "../../../tools/nodeEditor/dist/components/preview/svgs/playIcon.svg");
|
57631
|
+
/* 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");
|
57632
|
+
|
57576
57633
|
|
57577
57634
|
|
57578
57635
|
|
@@ -57589,6 +57646,7 @@ class PreviewMeshControlComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Com
|
|
57589
57646
|
super(props);
|
57590
57647
|
this._colorInputRef = react__WEBPACK_IMPORTED_MODULE_1__.createRef();
|
57591
57648
|
this._filePickerRef = react__WEBPACK_IMPORTED_MODULE_1__.createRef();
|
57649
|
+
this._envPickerRef = react__WEBPACK_IMPORTED_MODULE_1__.createRef();
|
57592
57650
|
this._onResetRequiredObserver = this.props.globalState.onResetRequiredObservable.add(() => {
|
57593
57651
|
this.forceUpdate();
|
57594
57652
|
});
|
@@ -57627,6 +57685,19 @@ class PreviewMeshControlComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Com
|
|
57627
57685
|
this._filePickerRef.current.value = "";
|
57628
57686
|
}
|
57629
57687
|
}
|
57688
|
+
useCustomEnv(evt) {
|
57689
|
+
const files = evt.target?.files || evt.dataTransfer?.files;
|
57690
|
+
if (files && files.length) {
|
57691
|
+
const file = files[0];
|
57692
|
+
this.props.globalState.envFile = file;
|
57693
|
+
this.props.globalState.envType = _previewType__WEBPACK_IMPORTED_MODULE_3__.PreviewType.Custom;
|
57694
|
+
this.props.globalState.onPreviewCommandActivated.notifyObservers(false);
|
57695
|
+
this.forceUpdate();
|
57696
|
+
}
|
57697
|
+
if (this._envPickerRef.current) {
|
57698
|
+
this._envPickerRef.current.value = "";
|
57699
|
+
}
|
57700
|
+
}
|
57630
57701
|
onPopUp() {
|
57631
57702
|
this.props.togglePreviewAreaComponent();
|
57632
57703
|
}
|
@@ -57677,16 +57748,16 @@ class PreviewMeshControlComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Com
|
|
57677
57748
|
}
|
57678
57749
|
const options = this.props.globalState.mode === core_Maths_math_color__WEBPACK_IMPORTED_MODULE_2__.NodeMaterialModes.Particle ? particleTypeOptions : meshTypeOptions;
|
57679
57750
|
const accept = this.props.globalState.mode === core_Maths_math_color__WEBPACK_IMPORTED_MODULE_2__.NodeMaterialModes.Particle ? ".json" : ".*";
|
57680
|
-
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { id: "preview-mesh-bar", children: [(this.props.globalState.mode === core_Maths_math_color__WEBPACK_IMPORTED_MODULE_2__.NodeMaterialModes.Material || this.props.globalState.mode === core_Maths_math_color__WEBPACK_IMPORTED_MODULE_2__.NodeMaterialModes.Particle) && ((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)(
|
57751
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { id: "preview-mesh-bar", children: [(this.props.globalState.mode === core_Maths_math_color__WEBPACK_IMPORTED_MODULE_2__.NodeMaterialModes.Material || this.props.globalState.mode === core_Maths_math_color__WEBPACK_IMPORTED_MODULE_2__.NodeMaterialModes.Particle) && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(shared_ui_components_lines_optionsLineComponent__WEBPACK_IMPORTED_MODULE_9__.OptionsLineComponent, { label: "", options: options, target: this.props.globalState, propertyName: "previewType", noDirectUpdate: true, onSelect: (value) => {
|
57681
57752
|
if (value !== _previewType__WEBPACK_IMPORTED_MODULE_3__.PreviewType.Custom + 1) {
|
57682
57753
|
this.changeMeshType(value);
|
57683
57754
|
}
|
57684
57755
|
else {
|
57685
57756
|
this._filePickerRef.current?.click();
|
57686
57757
|
}
|
57687
|
-
} }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.
|
57758
|
+
} }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { style: {
|
57688
57759
|
display: "none",
|
57689
|
-
}, title: "Preview with a custom mesh", children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("input", { ref: this._filePickerRef, multiple: true, id: "file-picker", type: "file", onChange: (evt) => this.useCustomMesh(evt), accept: accept }) })] })), this.props.globalState.mode === core_Maths_math_color__WEBPACK_IMPORTED_MODULE_2__.NodeMaterialModes.Material && ((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)("div", { title: "Turn-table animation", onClick: () => this.changeAnimation(), className: "button", id: "play-button", children: this.props.globalState.rotatePreview ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("img", { src:
|
57760
|
+
}, title: "Preview with a custom mesh", children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("input", { ref: this._filePickerRef, multiple: true, id: "file-picker", type: "file", onChange: (evt) => this.useCustomMesh(evt), accept: accept }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("input", { ref: this._envPickerRef, id: "env-picker", accept: ".env", type: "file", onChange: (evt) => this.useCustomEnv(evt) })] })] })), this.props.globalState.mode === core_Maths_math_color__WEBPACK_IMPORTED_MODULE_2__.NodeMaterialModes.Material && ((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)("div", { id: "env-button", title: "Environment image", className: "button", onClick: (_) => this._envPickerRef.current?.click(), children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("img", { src: _svgs_envPicker_svg__WEBPACK_IMPORTED_MODULE_6__, alt: "", id: "env-picker-image" }) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { title: "Turn-table animation", onClick: () => this.changeAnimation(), className: "button", id: "play-button", children: this.props.globalState.rotatePreview ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("img", { src: _svgs_pauseIcon_svg__WEBPACK_IMPORTED_MODULE_7__, alt: "" }) : (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("img", { src: _svgs_playIcon_svg__WEBPACK_IMPORTED_MODULE_8__, alt: "" }) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { id: "color-picker-button", title: "Background color", className: "button align", onClick: (_) => this.changeBackgroundClick(), children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("img", { src: _svgs_colorPicker_svg__WEBPACK_IMPORTED_MODULE_5__, alt: "", id: "color-picker-image" }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("input", { ref: this._colorInputRef, id: "color-picker", type: "color", value: this.props.globalState.backgroundColor.toHexString().slice(0, 7), onChange: (evt) => this.changeBackground(evt.target.value) })] })] })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { title: "Open preview in new window", id: "preview-new-window", onClick: () => this.onPopUp(), className: "button", children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("img", { src: _svgs_popOut_svg__WEBPACK_IMPORTED_MODULE_4__, alt: "" }) })] }));
|
57690
57761
|
}
|
57691
57762
|
}
|
57692
57763
|
|
@@ -57721,6 +57792,8 @@ var PreviewType;
|
|
57721
57792
|
PreviewType[PreviewType["Explosion"] = 10] = "Explosion";
|
57722
57793
|
PreviewType[PreviewType["Fire"] = 11] = "Fire";
|
57723
57794
|
PreviewType[PreviewType["Custom"] = 12] = "Custom";
|
57795
|
+
// Env
|
57796
|
+
PreviewType[PreviewType["Room"] = 13] = "Room";
|
57724
57797
|
})(PreviewType || (PreviewType = {}));
|
57725
57798
|
|
57726
57799
|
|
@@ -58284,6 +58357,9 @@ class PropertyTabComponent extends react__WEBPACK_IMPORTED_MODULE_1__.Component
|
|
58284
58357
|
core_Misc_tools__WEBPACK_IMPORTED_MODULE_5__.DataStorage.WriteNumber("PreviewType", this.props.globalState.previewType);
|
58285
58358
|
this.props.globalState.mode = value;
|
58286
58359
|
this.props.globalState.onResetRequiredObservable.notifyObservers(true);
|
58360
|
+
// Env
|
58361
|
+
this.props.globalState.envFile = undefined;
|
58362
|
+
core_Misc_tools__WEBPACK_IMPORTED_MODULE_5__.DataStorage.WriteNumber("EnvType", this.props.globalState.envType);
|
58287
58363
|
return true;
|
58288
58364
|
}
|
58289
58365
|
render() {
|
@@ -58416,6 +58492,7 @@ class GlobalState {
|
|
58416
58492
|
this.onIsLoadingChanged = new core_Misc_observable__WEBPACK_IMPORTED_MODULE_0__.Observable();
|
58417
58493
|
this.onPreviewCommandActivated = new core_Misc_observable__WEBPACK_IMPORTED_MODULE_0__.Observable();
|
58418
58494
|
this.onLightUpdated = new core_Misc_observable__WEBPACK_IMPORTED_MODULE_0__.Observable();
|
58495
|
+
this.onBackgroundHDRUpdated = new core_Misc_observable__WEBPACK_IMPORTED_MODULE_0__.Observable();
|
58419
58496
|
this.onPreviewBackgroundChanged = new core_Misc_observable__WEBPACK_IMPORTED_MODULE_0__.Observable();
|
58420
58497
|
this.onBackFaceCullingChanged = new core_Misc_observable__WEBPACK_IMPORTED_MODULE_0__.Observable();
|
58421
58498
|
this.onDepthPrePassChanged = new core_Misc_observable__WEBPACK_IMPORTED_MODULE_0__.Observable();
|
@@ -58429,11 +58506,13 @@ class GlobalState {
|
|
58429
58506
|
this.pointerOverCanvas = false;
|
58430
58507
|
this.onRefreshPreviewMeshControlComponentRequiredObservable = new core_Misc_observable__WEBPACK_IMPORTED_MODULE_0__.Observable();
|
58431
58508
|
this.previewType = core_Misc_observable__WEBPACK_IMPORTED_MODULE_0__.DataStorage.ReadNumber("PreviewType", _components_preview_previewType__WEBPACK_IMPORTED_MODULE_1__.PreviewType.Box);
|
58509
|
+
this.envType = core_Misc_observable__WEBPACK_IMPORTED_MODULE_0__.DataStorage.ReadNumber("EnvType", _components_preview_previewType__WEBPACK_IMPORTED_MODULE_1__.PreviewType.Room);
|
58432
58510
|
this.backFaceCulling = core_Misc_observable__WEBPACK_IMPORTED_MODULE_0__.DataStorage.ReadBoolean("BackFaceCulling", true);
|
58433
58511
|
this.depthPrePass = core_Misc_observable__WEBPACK_IMPORTED_MODULE_0__.DataStorage.ReadBoolean("DepthPrePass", false);
|
58434
58512
|
this.hemisphericLight = core_Misc_observable__WEBPACK_IMPORTED_MODULE_0__.DataStorage.ReadBoolean("HemisphericLight", true);
|
58435
58513
|
this.directionalLight0 = core_Misc_observable__WEBPACK_IMPORTED_MODULE_0__.DataStorage.ReadBoolean("DirectionalLight0", false);
|
58436
58514
|
this.directionalLight1 = core_Misc_observable__WEBPACK_IMPORTED_MODULE_0__.DataStorage.ReadBoolean("DirectionalLight1", false);
|
58515
|
+
this.backgroundHDR = core_Misc_observable__WEBPACK_IMPORTED_MODULE_0__.DataStorage.ReadBoolean("backgroundHDR", false);
|
58437
58516
|
this.controlCamera = core_Misc_observable__WEBPACK_IMPORTED_MODULE_0__.DataStorage.ReadBoolean("ControlCamera", true);
|
58438
58517
|
this._mode = core_Misc_observable__WEBPACK_IMPORTED_MODULE_0__.DataStorage.ReadNumber("Mode", core_Misc_observable__WEBPACK_IMPORTED_MODULE_0__.NodeMaterialModes.Material);
|
58439
58518
|
this.stateManager = new shared_ui_components_nodeGraphSystem_stateManager__WEBPACK_IMPORTED_MODULE_5__.StateManager();
|
@@ -64308,6 +64387,28 @@ module.exports = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5v
|
|
64308
64387
|
|
64309
64388
|
/***/ }),
|
64310
64389
|
|
64390
|
+
/***/ "../../../tools/nodeEditor/dist/components/preview/svgs/envPicker.svg":
|
64391
|
+
/*!****************************************************************************!*\
|
64392
|
+
!*** ../../../tools/nodeEditor/dist/components/preview/svgs/envPicker.svg ***!
|
64393
|
+
\****************************************************************************/
|
64394
|
+
/***/ ((module) => {
|
64395
|
+
|
64396
|
+
"use strict";
|
64397
|
+
module.exports = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyBjbGFzcz0iaWNvbiIgd2lkdGg9IjY0cHgiIGhlaWdodD0iNjQuMDBweCIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGZpbGw9IiNmZmZmZmYiIGQ9Ik0zMjAgNjI3LjJsMjkuODY2NjY3LTI5Ljg2NjY2NyAyOS44NjY2NjYgMjkuODY2NjY3IDY0IDY0IDE0OS4zMzMzMzQtMTQ5LjMzMzMzMyAyOS44NjY2NjYtMjkuODY2NjY3IDI5Ljg2NjY2NyAyOS44NjY2NjcgMTk2LjI2NjY2NyAxOTYuMjY2NjY2VjI5OC42NjY2NjdIMjEzLjMzMzMzM3Y0MzUuMmwxMDYuNjY2NjY3LTEwNi42NjY2Njd6IG0yOS44NjY2NjcgMjkuODY2NjY3TDIzOC45MzMzMzMgNzY4aDEzNi41MzMzMzRsLTQuMjY2NjY3LTQuMjY2NjY3IDQyLjY2NjY2Ny00Mi42NjY2NjYtNjQtNjR6TTgyMy40NjY2NjcgNzY4bC0xOTYuMjY2NjY3LTE5Ni4yNjY2NjctMTk2LjI2NjY2NyAxOTYuMjY2NjY3aDM5Mi41MzMzMzR6TTg5NiAyNTZ2NTU0LjY2NjY2N0gxNzAuNjY2NjY3VjI1Nmg3MjUuMzMzMzMzeiIgIC8+PC9zdmc+";
|
64398
|
+
|
64399
|
+
/***/ }),
|
64400
|
+
|
64401
|
+
/***/ "../../../tools/nodeEditor/dist/components/preview/svgs/icon-ibl.svg":
|
64402
|
+
/*!***************************************************************************!*\
|
64403
|
+
!*** ../../../tools/nodeEditor/dist/components/preview/svgs/icon-ibl.svg ***!
|
64404
|
+
\***************************************************************************/
|
64405
|
+
/***/ ((module) => {
|
64406
|
+
|
64407
|
+
"use strict";
|
64408
|
+
module.exports = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48ZGVmcz48c3R5bGU+LmNscy0xe3N0cm9rZS13aWR0aDowcHg7fTwvc3R5bGU+PC9kZWZzPjxwYXRoIGNsYXNzPSJjbHMtMSIgZD0ibTEyLDEuOTdDNi40NiwxLjk3LDEuOTcsNi40NiwxLjk3LDEyczQuNDksMTAuMDMsMTAuMDMsMTAuMDMsMTAuMDMtNC40OSwxMC4wMy0xMC4wM1MxNy41NCwxLjk3LDEyLDEuOTdabTAsMTguNTVjLTQuNzEsMC04LjUyLTMuODItOC41Mi04LjUyUzcuMjksMy40OCwxMiwzLjQ4czguNTIsMy44Miw4LjUyLDguNTItMy44Miw4LjUyLTguNTIsOC41MlptNS4wMS0xMC4zM2MwLTIuNzctMi4yNS01LjAxLTUuMDEtNS4wMXMtNS4wMSwyLjI0LTUuMDEsNS4wMXYuMjdzLjAzLjI2LjAzLjI2Yy4xNCwxLjI3Ljc0LDIuNDIsMS42OCwzLjI0bC4xNS4xMy43NywzLjM4LjA0LjE1Yy4yNi43My45MSwxLjIsMS42NSwxLjJoMS41NHMuMTUtLjAzLjE1LS4wM2MuNy0uMTQsMS4yMy0uNjQsMS4zOC0xLjMxbC43Ny0zLjM4LS4wMy4wM2MxLjItLjk2LDEuOS0yLjM5LDEuOS0zLjkzWm0tNC4xLDYuOTRjLS4wMi4wOS0uMS4xNi0uMi4xOGgtLjA3cy0xLjM0LDAtMS4zNCwwYy0uMSwwLS4xOS0uMDYtLjIyLS4xNWwtLjAyLS4wNy0uMjUtMS4wOGgyLjM1bC0uMjYsMS4xMlptMS4yOC00LjJsLS4xNy4xMy0uMDguMDdjLS4xLjEtLjE3LjIzLS4yLjM2bC0uMjMsMS4wMWgtLjA0cy0yLjk1LDAtMi45NSwwaC0uMDRzLS4yMy0xLjAxLS4yMy0xLjAxYy0uMDQtLjE4LS4xNS0uMzQtLjMtLjQ0LS44Ni0uNjEtMS40LTEuNTgtMS40Ni0yLjY1di0uMjNjMC0xLjkyLDEuNTctMy40OSwzLjUtMy40OXMzLjUxLDEuNTcsMy41MSwzLjUxYzAsMS4wOC0uNDksMi4wOC0xLjMyLDIuNzRaIiBzdHlsZT0iZmlsbDp3aGl0ZSIvPjwvc3ZnPg==";
|
64409
|
+
|
64410
|
+
/***/ }),
|
64411
|
+
|
64311
64412
|
/***/ "../../../tools/nodeEditor/dist/components/preview/svgs/omni.svg":
|
64312
64413
|
/*!***********************************************************************!*\
|
64313
64414
|
!*** ../../../tools/nodeEditor/dist/components/preview/svgs/omni.svg ***!
|