storysplat-viewer 0.1.4 → 0.1.6

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/dist/esm/index.js CHANGED
@@ -161175,10 +161175,6 @@ class Viewer {
161175
161175
  }
161176
161176
  }
161177
161177
 
161178
- // Register all built-in loaders when the module loads
161179
- console.log("StorySplat Viewer: Registering BabylonJS built-in loaders...");
161180
- registerBuiltInLoaders();
161181
- console.log("StorySplat Viewer: BabylonJS loaders registered successfully.");
161182
161178
  /**
161183
161179
  * Initializes the StorySplat Viewer within a given HTML element.
161184
161180
  *
@@ -161238,6 +161234,14 @@ function createViewerOptions(rawData, userOptions) {
161238
161234
  async function initializeViewer(targetElement, rawData, // Accept any JSON data
161239
161235
  options) {
161240
161236
  var _a, _b;
161237
+ // Register BabylonJS loaders at runtime
161238
+ try {
161239
+ registerBuiltInLoaders();
161240
+ }
161241
+ catch (error) {
161242
+ console.error("StorySplat Viewer: Failed to register BabylonJS loaders:", error);
161243
+ throw new Error("Failed to initialize BabylonJS loaders");
161244
+ }
161241
161245
  if (!targetElement) {
161242
161246
  throw new Error("StorySplat Viewer: Target element not provided or not found.");
161243
161247
  }