@preference-sl/pref-viewer 2.15.1 → 2.16.0-beta.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.
- package/package.json +1 -1
- package/src/pref-viewer-3d.js +8 -1
package/package.json
CHANGED
package/src/pref-viewer-3d.js
CHANGED
|
@@ -644,13 +644,20 @@ export default class PrefViewer3D extends HTMLElement {
|
|
|
644
644
|
|
|
645
645
|
// Options
|
|
646
646
|
let needUpdateLighting = false;
|
|
647
|
+
const iblOptions = config.scene?.ibl
|
|
648
|
+
? { ...(config.options ?? {}), ibl: { ...(config.options?.ibl ?? {}), ...config.scene.ibl } }
|
|
649
|
+
: config.options;
|
|
650
|
+
|
|
647
651
|
if (config.options) {
|
|
648
652
|
this.#checkNeedToUpdateCamera(config.options);
|
|
649
653
|
this.#checkNeedToUpdateMaterials(config.options);
|
|
650
|
-
await this.#checkNeedToUpdateIBL(config.options);
|
|
651
654
|
needUpdateLighting = this.#checkNeedToUpdateLighting(config.options);
|
|
652
655
|
}
|
|
653
656
|
|
|
657
|
+
if (iblOptions) {
|
|
658
|
+
await this.#checkNeedToUpdateIBL(iblOptions);
|
|
659
|
+
}
|
|
660
|
+
|
|
654
661
|
const loadDetail = await this.#babylonJSController.load(forceReload);
|
|
655
662
|
|
|
656
663
|
if (needUpdateLighting && typeof this.#babylonJSController.setIlluminationConfig === "function") {
|