MCPcopy Create free account
hub / github.com/microsoft/SandDance / isWebGL

Function isWebGL

docs/app/js/sanddance-app.js:59466–59468  ·  view source on GitHub ↗
(gl)

Source from the content-addressed store, hash-verified

59464var ERR_WEBGL = ERR_CONTEXT;
59465var ERR_WEBGL2 = "Requires WebGL2";
59466function isWebGL(gl) {
59467 return Boolean(gl && Number.isFinite(gl._version));
59468}
59469function isWebGL2(gl) {
59470 return Boolean(gl && gl._version === 2);
59471}

Callers 1

assertWebGLContextFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected