(Click image to view the animated version)

You can try the WebAssembly demo.

The source code (in C++) is contained in this repository.