shader-canvas
shader-canvas provides a thin, barebones wrapper around the WebGL API for running basic fragment shaders like those found in The Book of Shaders. It is unopinionated, providing no uniforms or attributes by default.
The entire library is tiny (~2kB compressed), so it can be used to add images and patterns on websites with a significantly smaller download than an image, GIF, or video.
Basic example
; var shaderCanvas = ;shaderCanvas;shaderCanvas;shaderCanvas;documentbody;
See example/index.html for more examples.
Development
Install dependencies:
yarn install
Run the typescript watcher:
yarn run watch
Serve the example page:
yarn run serve
Open the example page in your browser:
open http://localhost:8080/example/
Credits
Extracted from atom-glsl-preview.