# is-webgl2-context **Repository Path**: mirrors_Jam3/is-webgl2-context ## Basic Information - **Project Name**: is-webgl2-context - **Description**: whether a canvas context is using WebGL 2.0 - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-11-23 - **Last Updated**: 2026-03-22 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # is-webgl2-context [![stable](http://badges.github.io/stability-badges/dist/stable.svg)](http://github.com/badges/stability-badges) Test whether a canvas context is using WebGL 2. ```js var isWebGL2 = require('is-webgl2-context') if (isWebGL2(gl)) { // do 2.0 effects } else { // do 1.0 effects } ``` ## Usage [![NPM](https://nodei.co/npm/is-webgl2-context.png)](https://www.npmjs.com/package/is-webgl2-context) #### `bool = isWebGL2(gl)` Returns `true` if `gl` is an instance of WebGL2RenderingContext. ## See Also - [is-webgl-context](https://github.com/mattdesl/is-webgl-context) ## License MIT, see [LICENSE.md](http://github.com/Jam3/is-webgl2-context/blob/master/LICENSE.md) for details.