Skip to content

mattdesl/gl-constants

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

all the WebGL 1.0 constants

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published