@orangelogic/design-system 2.218.0 → 2.219.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.
|
@@ -1402,12 +1402,23 @@ class mne {
|
|
|
1402
1402
|
async loadModel(e) {
|
|
1403
1403
|
this.engine.clearInternalTexturesCache(), this.engine.displayLoadingUI = () => this.displayLoadingUI();
|
|
1404
1404
|
try {
|
|
1405
|
-
const t = await
|
|
1405
|
+
const t = await this.loadScene(e);
|
|
1406
1406
|
return this.scene && this.scene.dispose(), this.scene = t, this.scene.skipFrustumClipping = !0, this.hideLoadingUI(), t;
|
|
1407
1407
|
} catch (t) {
|
|
1408
1408
|
throw this.hideLoadingUI(), t;
|
|
1409
1409
|
}
|
|
1410
1410
|
}
|
|
1411
|
+
async loadScene(e) {
|
|
1412
|
+
try {
|
|
1413
|
+
return await window.BABYLON.LoadSceneAsync(e, this.engine);
|
|
1414
|
+
} catch (t) {
|
|
1415
|
+
if (t instanceof Error && "innerError" in t && t.innerError instanceof Error && "errorCode" in t.innerError && t.innerError.errorCode === window.BABYLON.ErrorCodes.GLTFLoaderUnexpectedMagicError)
|
|
1416
|
+
return window.BABYLON.LoadSceneAsync(e, this.engine, {
|
|
1417
|
+
pluginExtension: ".gltf"
|
|
1418
|
+
});
|
|
1419
|
+
throw t;
|
|
1420
|
+
}
|
|
1421
|
+
}
|
|
1411
1422
|
/**
|
|
1412
1423
|
* Starts the Babylon.js render loop for continuous scene rendering.
|
|
1413
1424
|
* Waits for scene to be ready before beginning the render loop.
|
package/library/package.json
CHANGED
|
@@ -66,6 +66,7 @@ export declare class SceneController {
|
|
|
66
66
|
* @throws Error if model loading fails
|
|
67
67
|
*/
|
|
68
68
|
loadModel(url: string): Promise<Scene>;
|
|
69
|
+
private loadScene;
|
|
69
70
|
/**
|
|
70
71
|
* Starts the Babylon.js render loop for continuous scene rendering.
|
|
71
72
|
* Waits for scene to be ready before beginning the render loop.
|