https://bitbucket.org/bryankadzban/frontier rewritten for html5/webgl