is-webgl-enabled

1.0.2 • Public • Published

is-webgl-enabled

Detect if WebGL is enabled in the current environment.

npm travis standard

Install

npm install is-webgl-enabled

Usage

var isWebGLEnabled = require('is-webgl-enabled')
 
if (isWebGLEnabled()) {
  // WebGL is enabled! :)
} else {
  // WebGL is not enabled! :(
}

Why

I saw a few different implementations on npm, but they were either poorly documented, exported a value instead of a function, or returned an inconsitent type (such as true or null). So I made one for myself that just works™.

Also this became extra useful when my GPU got blacklisted by chromium.

Contributing

Contributions welcome! Please read the contributing guidelines first.

License

ISC

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    78
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    78
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i is-webgl-enabled

Weekly Downloads

48

Version

1.0.2

License

ISC

Last publish

Collaborators

  • ungoldman