neo-blessed/test/widget-play.js

18 lines
359 B
JavaScript
Raw Normal View History

2015-05-14 04:00:55 +00:00
var blessed = require('../');
var screen = blessed.screen({
dump: __dirname + '/logs/play.log',
2015-07-22 02:23:57 +00:00
smartCSR: true,
warnings: true
2015-05-14 04:00:55 +00:00
});
var frames = require(__dirname + '/frames.json');
var timer = setInterval(function() {
if (!frames.length) {
clearInterval(timer);
return screen.destroy();
}
2015-05-14 04:00:55 +00:00
process.stdout.write(frames.shift());
}, 100);