More robust webgl handling

This commit is contained in:
Mononaut
2023-08-22 00:05:22 +09:00
parent ead32a4a65
commit 9ba7ab9975
2 changed files with 19 additions and 5 deletions

View File

@@ -90,7 +90,7 @@ export const download = (href, name) => {
export function detectWebGL(): boolean {
const canvas = document.createElement('canvas');
const gl = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');
const gl = canvas.getContext('webgl');
return !!(gl && gl instanceof WebGLRenderingContext);
}