1.0.3 • Published 2 years ago
babel-plugin-inline-webgl-constants v1.0.3
babel-plugin-inline-webgl-constants
Replaces gl.<constant> or GL.<constant> references with the corresponding OpenGL constant value.
When used on luma.gl applications, also removes any import of the GL namespace.
Example
in
const max = gl.MAX_VERTEX_ATTRIBS;out
const max = 34921;in
import GL from '@luma.gl/constants';
...
const max = GL.MAX_VERTEX_ATTRIBS;out
...
const max = 34921;Installation
$ npm install --save-dev babel-plugin-inline-webgl-constantsUsage
Via .babelrc (Recommended)
.babelrc
{
"plugins": ["inline-webgl-constants"]
}Via CLI
$ babel --plugins inline-webgl-constants script.jsVia Node API
require('babel-core').transform('code', {
plugins: ['inline-webgl-constants']
});2.0.0-alpha.1
2 years ago
9.0.0-alpha.17
2 years ago
1.0.3
5 years ago
1.0.2
6 years ago
1.0.1
6 years ago
1.0.0
7 years ago