diff --git a/glTF-Sample-Renderer b/glTF-Sample-Renderer index 4c87bce8..f79e91f4 160000 --- a/glTF-Sample-Renderer +++ b/glTF-Sample-Renderer @@ -1 +1 @@ -Subproject commit 4c87bce87b43dd85dd4b7133bfdb638ee2be34a8 +Subproject commit f79e91f4e1986897f444a8a2a3b4009fb1731e53 diff --git a/src/main.js b/src/main.js index 3f909c81..8d2cd05a 100644 --- a/src/main.js +++ b/src/main.js @@ -152,6 +152,19 @@ export default async () => { uiModel.exitLoadingState(); return state; + }).catch((error) => { + console.error("Loading failed: "+ error); + resourceLoader + .loadGltf(undefined, undefined) + .then((gltf) => { + state.gltf = gltf; + state.sceneIndex = 0; + state.cameraIndex = undefined; + + uiModel.exitLoadingState(); + redraw = true; + }); + return state; }) ); }),