Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gl-constants

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gl-constants

all the WebGL 1.0 constants

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
26K
increased by16.89%
Maintainers
1
Weekly downloads
 
Created
Source

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.

Keywords

FAQs

Package last updated on 24 May 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc