# gl-constants

> all the WebGL 1.0 constants

Latest version **1.0.0** (published 2015-05-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install gl-constants
pnpm add gl-constants
yarn add gl-constants
bun add gl-constants
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2015-05-24 |
| First published | 2015-05-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Matt DesLauriers |
| Maintainers | mattdesl |
| Keywords | gl, webgl, glsl, stackgl, constant, constants, flag, flags, param, params, fields, field, options |

## Links

- npm: https://www.npmjs.com/package/gl-constants
- Repository: https://github.com/mattdesl/gl-constants
- Issues: https://github.com/mattdesl/gl-constants/issues
- npm.io page: https://npm.io/package/gl-constants

## Recent versions

- 1.0.0 (latest) — 2015-05-24

## README

# gl-constants

[![stable](http://badges.github.io/stability-badges/dist/stable.svg)](http://github.com/badges/stability-badges)

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

```js
var constants = require('gl-constants')

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

You can also 'lookup' a constant by number:

```js
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](https://nodei.co/npm/gl-constants.png)](https://www.npmjs.com/package/gl-constants)

#### `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](http://github.com/mattdesl/gl-constants/blob/master/LICENSE.md) for details.

---
_Source: https://npm.io/package/gl-constants · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
