@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 +1 -1
- package/src/index.js +0 -15
- package/src/models/window.gltf +21424 -0
package/package.json
CHANGED
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(
|