glsl-token-extension-dedupe

1.0.0 • Public • Published

glsl-token-extension-dedupe

stable

Given a series of GLSL tokens, dedupes any extension declarations and places them at the top of the shader source.

Usage

NPM

dedupe(tokens)

Modifies tokens in place to remove duplicate extension declarations. Declarations take the following priority from lowest to highest:

  • disable
  • enable
  • warn
  • require

If a declaration of higher priority in the list exists it will replace any other declarations. This can cause issues, for example, if both disable and enable are used for the same extension. As such it's recommended that you avoid using disable at all in glslify packages published to npm.

Contributing

See stackgl/contributing for details.

License

MIT. See LICENSE.md for details.

Dependents (0)

Package Sidebar

Install

npm i glsl-token-extension-dedupe

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • dy
  • archmoj
  • hughsk
  • mikolalysenko
  • substack
  • mattdesl
  • chrisdickinson
  • yoshuawuyts
  • mikkoh
  • rezaali
  • tatumcreative
  • wwwtyro
  • thibauts
  • bpostlethwaite
  • dfcreative
  • erkaman
  • gre
  • rreusser
  • vorg