#AXEL (ASCII-Pixel)
AXEL is a Node.js graphics library for drawing graphics to your console with ASCII characters. AXEL has been designed to help create games, retro graphics and spice up the terminal components of your Node.js applications.
AXEL is short for ASCII-PIXEL.
##Basic Usage
var ctx = require('axel');
ctx.clear();
ctx.bg(0,255,0);
ctx.line(1,1,10,10);
##Example Output
The screenshot below demonstrates a game I am currently writing where AXEL is being used to control the pixels. You can find the source for the Blitzr game here: https://github.com/F1LT3R/blitzr

##Commands
###box(x1, y1, width, height)

var ctx = require('axel');
ctx.clear();
ctx.bg(255,0,0);
ctx.box(2,2,8,4);
ctx.bg(255,255,0);
ctx.box(12,2,8,4);
ctx.bg(0,255,0);
ctx.box(2,7,8,4);
ctx.bg(0,0,255);
ctx.box(12,7,8,4);
ctx.cursor.restore();
###line(x1, y1, x2, y2)

var ctx = require('axel');
ctx.clear();
ctx.bg(0,255,0);
ctx.line(1,1,10,10);
ctx.cursor.restore();
###point(x, y)

var ctx = require('axel');
ctx.clear();
ctx.bg(0,128,255);
for (var i=0; i< 100; i+=1) {
ctx.point(
Math.random()*ctx.cols,
Math.random()*ctx.rows
);
}
ctx.cursor.restore();
###fg(red, green, blue)
Changes the foreground color of the ASCII-Pixel
###bg(red, green, blue)
Changes the background color of the ASCII-Pixel
###text(x, y, string)

var ctx = require('axel');
ctx.clear();
ctx.bg(255,0,0);
ctx.fg(255,255,255);
ctx.text(5,1," WHITE ON RED! ");
ctx.bg(255,255,0);
ctx.fg(0,0,0);
ctx.text(10,2," BLACK ON YELLOW! ");
ctx.cursor.restore();
###scrub(x1, y1, width, height)
Removes pixels from the console. Similar to HTML5 Canvas 2D context.clear().

var ctx = require('axel');
ctx.clear();
ctx.bg(128,255,0);
ctx.box(2,2,30,15);
ctx.scrub(4,3,8,5);
ctx.scrub(13,3,8,7);
ctx.scrub(22,3,8,13);
ctx.cursor.restore();
###brush = '[character]'
Changes the character that gets drawn into the pixel location. This can be used to create texture effects, and ASCII-Art.

var ctx = require('axel');
ctx.clear();
var brushes = " ░▒▓█";
function nextBrush(n){
return brushes[parseInt(n%brushes.length)];
}
for (var y =1; y< ctx.rows; y+=1) {
ctx.brush = nextBrush(y);
ctx.line(1, y, ctx.cols, y);
}
var circSize = Math.sqrt(ctx.rows + ctx.cols)*2
, centerX = ctx.cols / 2
, centerY = ctx.rows / 2
;
for (var m =1; m< circSize; m+=1) {
ctx.brush = nextBrush(m);
ctx.circ(centerX, centerY, m);
}
ctx.cursor.restore();
###clear()
Clears the whole console. Similar to writing "clear" in your terminal.
##Demos
The demonstrations are stored in the ./demos directory. To begin a demonstration...
cd demos
node [demo-name.js]