![]() | Name | Last modified | Size | Description |
---|---|---|---|---|
![]() | Parent Directory | - | ||
![]() | LICENSE.md | 2 years ago | 1.2K | 0fb859dc fixed mobile overflwo options [كارل مبارك] |
![]() | README.md | 2 years ago | 1.2K | 0fb859dc fixed mobile overflwo options [كارل مبارك] |
![]() | index.js | 2 years ago | 493 | 0fb859dc fixed mobile overflwo options [كارل مبارك] |
![]() | package.json | 2 years ago | 1.6K | 0fb859dc fixed mobile overflwo options [كارل مبارك] |
Retrieve the values defined with preprocessor statements in a selection of GLSL tokens.
Doesn't handle full function-style macros for the time being. Patches welcome!
defs = defines(tokens)
Where tokens
is an array of tokens produced by
glsl-tokenizer.
Returns an dictionary object where keys are the name of the defined variable, and values are the values of the defined variable. If a variable is not assigned a value, this will be an empty string.
For example, the following:
#define PI 3.14
#define TAU (PI*2.)
#define VEC vec3(1.)
#define EMPTY
Would yield:
{
PI: '3.14',
TAU: '(PI*2.)',
VEC: 'vec3(1.)',
EMPTY: ''
}
See stackgl/contributing for details.
MIT. See LICENSE.md for details.