gl-constants
all the WebGL 1.0 constants
Last updated 12 years ago by mattdesl .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install gl-constants 
SYNC missed versions from official npm registry.

gl-constants

stable

All the WebGL 1.0 constants as a module. Useful for testing.

var constants = require('gl-constants')

texture.minFilter = constants.LINEAR
texture.magFilter = constants.NEAREST

You can also 'lookup' a constant by number:

var lookup = require('gl-constants/lookup')

console.log(lookup(1282)) // INVALID_OPERATION

Note that some fields share the same number, like NONE, ZERO POINTS and NO_ERROR all use 0.

Usage

NPM

require('gl-constants')

An object where each key corresponds to the WebGL constant integer value.

require('gl-constants/lookup')(number)

Returns the key name associated with the given WebGL constant integer value.

License

MIT, see LICENSE.md for details.

Current Tags

  • 1.0.0                                ...           latest (12 years ago)

1 Versions

  • 1.0.0                                ...           12 years ago
Maintainers (1)
Downloads
Total 5
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 2
Dependencies (0)
None
Dev Dependencies (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE