@thi.ng/webgl

This project is part of the
@thi.ng/umbrella monorepo.
About
Declarative WebGL 1.0 / 2.0 abstraction layer, partially ported &
updated from Clojure/ClojureScript versions of
thi.ng/geom.
Features
- Extensive set of WebGL related types & interfaces
- Declarative shader definition
- option to fully define shaders in TypeScript and transpile to GLSL (via
@thi.ng/shader-ast)
- attribute, varying, uniform & output type declarations via a simple config object
- GLSL code generation of data type declarations
- automatic support for GLSL ES 1.0 & 3.0
- optional layout attrib layout support for GLES 3 (WebGL2)
- automatic & typed uniform setters
- pre-declared desired GL draw state flags / settings
- customizable shader presets
- Declarative geometry, attribute & index buffer specs
- Declarative instancing (always available in WebGL2, or via ANGLE ext in WebGL1)
- also supported by bundled shader presets
- Texture wrapper & declarative config
- FBO support with multiple attachments & render buffers
- GPGPU job utilities
- Geometry & texture generators
- WebGL extension helpers
- WebGL canvas creation / setup
Status: Alpha / WIP
Installation
yarn add @thi.ng/webgl
Dependencies
Support packages
Usage examples
Several examples are included in the /examples
folder of this repo...
Authors
License
© 2014 - 2019 Karsten Schmidt // Apache Software License 2.0