# is-webgl2-context

> whether a canvas context is using WebGL 2.0

Latest version **1.0.0** (published 2015-06-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install is-webgl2-context
pnpm add is-webgl2-context
yarn add is-webgl2-context
bun add is-webgl2-context
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2015-06-23 |
| First published | 2015-06-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Matt DesLauriers |
| Maintainers | mattdesl |
| Keywords | is, webgl, 2, 2.0, gl2, webgl2, context, canvas, html, web |

## Links

- npm: https://www.npmjs.com/package/is-webgl2-context
- Repository: https://github.com/Jam3/is-webgl2-context
- Issues: https://github.com/Jam3/is-webgl2-context/issues
- npm.io page: https://npm.io/package/is-webgl2-context

## Alternatives

- [memory-cache](https://npm.io/package/memory-cache.md) — 795.0K weekly downloads
- [@httptoolkit/proxy-agent](https://npm.io/package/@httptoolkit/proxy-agent.md) — 11.2K weekly downloads
- [express-cache-controller](https://npm.io/package/express-cache-controller.md) — 5.3K weekly downloads
- [http-cache-middleware](https://npm.io/package/http-cache-middleware.md) — 4.5K weekly downloads
- [cache2](https://npm.io/package/cache2.md) — 1.5K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2015-06-23

## 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.

---
_Source: https://npm.io/package/is-webgl2-context · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
