@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@preference-sl/pref-viewer",
3
- "version": "2.15.1",
3
+ "version": "2.16.0-beta.0",
4
4
  "description": "Web Component to preview GLTF models with Babylon.js",
5
5
  "author": "Alex Moreno Palacio <amoreno@preference.es>",
6
6
  "scripts": {
@@ -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") {