feat: unified 0 and 90 degree PDF envelope and category descriptors
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
let _webglSupported: boolean | null = null;
|
||||
|
||||
export function isWebGLSupported(): boolean {
|
||||
if (_webglSupported !== null) return _webglSupported;
|
||||
|
||||
try {
|
||||
const canvas = document.createElement('canvas');
|
||||
const gl =
|
||||
canvas.getContext('webgl2') ??
|
||||
canvas.getContext('webgl') ??
|
||||
canvas.getContext('experimental-webgl');
|
||||
_webglSupported = gl !== null;
|
||||
} catch {
|
||||
_webglSupported = false;
|
||||
}
|
||||
|
||||
return _webglSupported;
|
||||
}
|
||||
Reference in New Issue
Block a user