chore: init

This commit is contained in:
Cfp
2025-06-20 17:08:14 +02:00
commit 30fb523cf7
186 changed files with 13188 additions and 0 deletions

18
src/lib/webgl.ts Normal file
View File

@ -0,0 +1,18 @@
export function checkWebGL() {
if(window.WebGLRenderingContext) {
const canvas = document.createElement("canvas");
try {
const ctx = canvas.getContext("webgl2") || canvas.getContext("webgl");
if(ctx && typeof ctx.getParameter == "function") {
return true;
}
} catch(e) {
// Supported, but disabled
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.");
return false;
}