Skip to content

Latest commit

 

History

History
28 lines (19 loc) · 16.4 KB

README.md

File metadata and controls

28 lines (19 loc) · 16.4 KB

ts-glsl

A GLSL Parser implemented purely in TypeScript type annotations.

In accordance with GLSL ES Specification 1.0.

You can install ts-glsl in your own project with npm install ts-glsl.

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>;

License

MIT