@preference-sl/pref-viewer 2.12.0-beta.6 → 2.12.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.12.0-beta.6",
3
+ "version": "2.12.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": {
@@ -527,8 +527,8 @@ export default class BabylonJSController {
527
527
  }
528
528
 
529
529
  const pipelineOptions = {
530
- resolutionExp: 8, // Higher resolution for better shadow quality
531
- sampleDirections: 4, // More sample directions for smoother shadows
530
+ resolutionExp: 1, // Higher resolution for better shadow quality (recomended 8)
531
+ sampleDirections: 4, // More sample directions for smoother shadows (recomended 4)
532
532
  ssShadowsEnabled: true,
533
533
  shadowRemanence: 0.85,
534
534
  triPlanarVoxelization: true,
@@ -597,6 +597,9 @@ export default class BabylonJSController {
597
597
  */
598
598
  #initializeDefaultLightShadows() {
599
599
  this.#shadowGen = [];
600
+ if (!this.#dirLight) {
601
+ return;
602
+ }
600
603
  this.#dirLight.autoUpdateExtends = false;
601
604
  const shadowGenerator = new ShadowGenerator(1024, this.#dirLight);
602
605
  shadowGenerator.useBlurExponentialShadowMap = true;
@@ -1211,7 +1214,14 @@ export default class BabylonJSController {
1211
1214
  },
1212
1215
  };
1213
1216
 
1214
- return [container, await LoadAssetContainerAsync(sourceData.source, this.#scene, options)];
1217
+ let assetContainer = null;
1218
+
1219
+ try {
1220
+ assetContainer = await LoadAssetContainerAsync(sourceData.source, this.#scene, options);
1221
+ return [container, assetContainer];
1222
+ } catch (error) {
1223
+ return [container, assetContainer];
1224
+ }
1215
1225
  }
1216
1226
 
1217
1227
  /**