UNPKG

maplibre-gl

Version:

BSD licensed community fork of mapbox-gl, a WebGL interactive maps library

7 lines (6 loc) 274 B
export function isWebGL2( gl: WebGLRenderingContext | WebGL2RenderingContext ): gl is WebGL2RenderingContext { // this method is really faster than fetching a cache: return typeof WebGL2RenderingContext !== 'undefined' && gl instanceof WebGL2RenderingContext; }