@preference-sl/pref-viewer 2.1.5 → 2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@preference-sl/pref-viewer",
3
- "version": "2.1.5",
3
+ "version": "2.1.6",
4
4
  "description": "Web Component to preview GLTF models with Babylon.js",
5
5
  "author": "Alex Moreno Palacio <amoreno@preference.es>",
6
6
  "license": "MIT",
package/src/index.js CHANGED
@@ -223,21 +223,6 @@ class PrefViewer extends HTMLElement {
223
223
  // Dispose previous meshes so we don’t accumulate them
224
224
  this._disposePreviousMeshes();
225
225
 
226
- SceneLoader.OnPluginActivatedObservable.addOnce((plugin) => {
227
- if (plugin.name === "gltf") {
228
- plugin.preprocessUrlAsync = async (url) => {
229
- try {
230
- const parsed = new URL(url);
231
- return parsed.href; // Absolute URL: use as-is
232
- } catch {
233
- // If relative, optionally fix or log
234
- console.warn("Relative texture URL, resolving manually:", url);
235
- return url; // or prepend your desired base path here
236
- }
237
- };
238
- }
239
- });
240
-
241
226
  try {
242
227
  console.log(`PrefViewer: ImportMeshAsync("${this.modelUrl}")`);
243
228
  const result = await SceneLoader.ImportMeshAsync(