It's worth mentioning that Mr.doob (author of this code) is also an author of three.js graphics library and many astonishing demos. Check out his Github and home page (http://mrdoob.com) for (many) more interesting things!
Example: http://mrdoob.github.io/three.js/examples/webgl_terrain_dyna...