2016-09-21 21:52:35 +02:00
|
|
|
/*#
|
|
|
|
termap - Terminal Map Viewer
|
|
|
|
by Michael Strassburger <codepoet@cpan.org>
|
|
|
|
Discover the planet in your console!
|
|
|
|
|
|
|
|
This scripts boots up the application.
|
|
|
|
|
|
|
|
TODO: params parsing and so on
|
|
|
|
#*/
|
|
|
|
|
|
|
|
require('coffee-script/register');
|
|
|
|
|
|
|
|
const fs = require('fs');
|
|
|
|
const Termap = require(__dirname+'/src/Termap');
|
2016-09-22 05:09:07 +02:00
|
|
|
const Tile = require(__dirname+'/src/Tile')
|
2016-09-21 21:52:35 +02:00
|
|
|
|
|
|
|
termap = new Termap();
|
|
|
|
|
|
|
|
// TODO: abstracing this class, create loader class
|
2016-09-29 01:24:00 +02:00
|
|
|
data = fs.readFileSync(__dirname+"/tiles/regensburg.pbf.gz");
|
2016-09-22 05:09:07 +02:00
|
|
|
tile = new Tile(data);
|
|
|
|
termap.renderer.features = tile.layers
|
2016-09-21 21:52:35 +02:00
|
|
|
termap._draw();
|