by Kevin Krausse
This demo requires an up to date browser and rendering to floating point textures, so for the latter reason it doesnt work on most mobile devices.
All credit to theory must be given to Jos Stam's paper about real time fluid simuation. He describes an implementation using for loops in C, but I implemented the for loops instead by rendering to a texture and using shader code in WebGL to implement the logic that would go inside of the for loops. In theory this should be faster becuase it utilizes the computer's graphics hardware, but I haven't tested it. Also, I used Evan Wallace's LightGL WebGL library to help make things a little easier.