Skip to content
Detect WebGL
JavaScript HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
docs
lib
lint/plato
release
test
.eslintignore
.eslintrc
.gitignore
.npmignore
.travis.yml
LICENSE
README.md
index.js
package.json

README.md

WebGLDetector.js Build Status

npm

Detect WebGL.

This module made of WebModule.

Documentation

Browser, NW.js and Electron

<script src="<module-dir>/lib/WebModule.js"></script>
<script src="<module-dir>/lib/WebGLDetector.js"></script>
<script>
WebGLDetector.detect();
WebGLDetector.WEBGL_CONTEXT     // -> "wegbl"
WebGLDetector.WEBGL_VERSION     // -> "WebGL 1.0 (OpenGL ES 2.0 Chromium)"
WebGLDetector.WEBGL_VERNDOR     // -> "WebKit"
WebGLDetector.WEBGL_RENDERER    // -> "WebKit WebGL"
WebGLDetector.WEBGL_SL_VERSION  // -> "WebGL GLSL ES 1.0 (OpenGL ES GLSL ES 1.0 Chromium)"
WebGLDetector.MAX_TEXTURE_SIZE  // -> 16384
</script>
You can’t perform that action at this time.