demotool
is a minimalistic tool for making WebGL intros. It aims to have as little javascript as possible, while providing you with a WebGL context to draw your shaders on. It also provides a minimal tracker for creating music.
npm i
npm start
- open
./dist/index.html
in your favourite browser npm run build
for creating a packed.png.html
file
- Use a javascript minifier before using
pnginator.rb
. It can significantly reduce the size of the end product. Many minifiers don't like the backticks though - you might need to pass the shaders as strings instead - sadly, that means you cannot have newlines, but you need to have each shader on one line. - Use a shader minifier for the shaders before passing them as strings in the javascript. Again, significant reductions.
pnginator.rb
is included in this repository, as it is helpful for building the final tiny "executable". I don't claim ownership to it though: I modified it from a gist written by Gasman, based on an original idea by Daeken
hg_sdf
Creative Commons Attribution-NonCommercial (CC BY-NC) Mercury. If that license does not suit your demo:
- remove that
.glsl
file from theshaders
directory - remove the import in
fragment.glsl
- remove the initialization call in
main.glsl
pnginator
copyright original authors & my minor edits.
Everything else in this repository: dual licensed with CC-0 and the MIT License (because some jurisdictions apparently don't accept public domain)