https://github.com/stackgl/webglew
WebGL Extension Wrangler
https://github.com/stackgl/webglew
Last synced: about 1 year ago
JSON representation
WebGL Extension Wrangler
- Host: GitHub
- URL: https://github.com/stackgl/webglew
- Owner: stackgl
- License: mit
- Created: 2013-02-23T03:21:40.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2014-12-01T06:06:28.000Z (over 11 years ago)
- Last Synced: 2024-10-28T17:27:22.163Z (over 1 year ago)
- Language: JavaScript
- Size: 159 KB
- Stars: 17
- Watchers: 11
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
webglew
=======
**WebGL** **E** xtension **W** rangler. Manages WebGL extensions so you don't have to.
# Example
```javascript
var canvas = document.createElement("canvas")
var gl = canvas.getContext("webgl")
var ext = require("webglew")(gl)
if(ext.OES_texture_float) {
console.log("GL context supports floats!")
} else {
console.log("No floating point textures :'(")
}
```
# Install
```
npm install webglew
```
# API
#### `require("webglew")(gl)`
To use the library, call the module with a WebGL context and it will return a JavaScript object with a list of properties. For convenience, extensions with a vendor specific prefix are aliased to the root WEBGL_* name. For example,
WEBKIT_WEBGL_lose_context
Becomes:
WEBGL_lose_context
# Credits
(c) 2013-2014 Mikola Lysenko. MIT