mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 15:24:55 +08:00
[ts][player] Fix error message in case WebGL context could not be created.
This commit is contained in:
parent
ddace9b1c7
commit
ee72ad3e22
@ -336,7 +336,7 @@ export class SpinePlayer implements Disposable {
|
||||
this.sceneRenderer = new SceneRenderer(this.canvas, this.context, true);
|
||||
if (config.showLoading) this.loadingScreen = new LoadingScreen(this.sceneRenderer);
|
||||
} catch (e) {
|
||||
this.showError("Sorry, your browser does not support WebGL.\nPlease use the latest version of Firefox, Chrome, Edge, or Safari.", e as any);
|
||||
this.showError("Sorry, your browser does not support WebG, or you have disabled WebGL in your browser settingsL.\nPlease use the latest version of Firefox, Chrome, Edge, or Safari.", e as any);
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -1060,6 +1060,7 @@ export class SpinePlayer implements Disposable {
|
||||
+ message.replace("\n", "<br><br>") + `</div>`));
|
||||
if (this.config.error) this.config.error(this, message);
|
||||
throw (error ? error : new Error(message));
|
||||
console.log(error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user