ts-glsl
v1.0.0
Published
A GLSL Parser implemented purely in TypeScript type annotations.
Downloads
4
Readme
ts-glsl
A GLSL Parser implemented purely in TypeScript type annotations.
In accordance with GLSL ES Specification 1.0.
See the live demo
import { Parse } from 'ts-glsl';
const vertex = `
attribute vec3 position;
varying vec2 uv;
void main() {
gl_Position = vec4(position, 1.0);
uv = position.xy;
}
`
type AST = Parse<typeof vertex>;