style: add eslint and prettier
Some checks failed
TrafficCue CI / check (push) Successful in 26s
TrafficCue CI / build (push) Has been cancelled

This commit is contained in:
Cfp
2025-06-22 17:53:32 +02:00
parent 16c0f0c399
commit f2348873fd
100 changed files with 5110 additions and 7344 deletions

View File

@ -1,18 +1,22 @@
export function checkWebGL() {
if(window.WebGLRenderingContext) {
if (window.WebGLRenderingContext) {
const canvas = document.createElement("canvas");
try {
const ctx = canvas.getContext("webgl2") || canvas.getContext("webgl");
if(ctx && typeof ctx.getParameter == "function") {
if (ctx && typeof ctx.getParameter == "function") {
return true;
}
} catch(e) {
} catch (_e) {
// Supported, but disabled
alert("WebGL is supported but disabled in your browser. Please enable it in your settings.")
alert(
"WebGL is supported but disabled in your browser. Please enable it in your settings.",
);
}
return false;
}
// WebGL is not supported
alert("WebGL is not supported in your browser. Please try a different browser.");
alert(
"WebGL is not supported in your browser. Please try a different browser.",
);
return false;
}
}