The source code is there: https://github.com/nraynaud/polygonsJS/