5kb webgl2 fluid simulation
Implementation of the Stable Fluid algorithm, using webgl2 features (texelFetch, textureSize, vertex array objects) in about 500 lines of codes, and compressed to less than ~5kb of javascript.
References
GPU Gems: https://developer.nvidia.com/gpugems/gpugems/part-vi-beyond-triangles/chapter-38-fast-fluid-dynamics-simulation-gpu
Stable Fluids paper: https://www.ljll.math.upmc.fr/~frey/cours/references/Stam%20J.,%20Stable%20fluids.pdf
WebGL1 implementation: https://github.com/PavelDoGreat/WebGL-Fluid-Simulation