Thrunium have simplified drawing. We have extended the normal way to draw on the 2d context canvas.
Draws a line from (x1, y1) to (x2, y2) on the 2d context canvas.
var game = new THRUNIUM.Game(400, 400);
game.drawLine(100, 100, 200, 200);
// draws a diagonal line
Draws text at (x, y) on 2d context canvas.
var game = new THRUNIUM.Game(400, 400);
game.drawText("Hello World!", 100, 100);
// draws text on the canvas
Draws rectangle at (x, y) with dimension (width, height) on 2d context canvas.
var game = new THRUNIUM.Game(400, 400);
game.drawRect(100, 100, 20, 20);
// draws rectangle on the canvas
Draws circle at (x, y) with dimension (radius) on 2d context canvas.
var game = new THRUNIUM.Game(400, 400);
game.drawCircle(100, 100, 20);
// draws circle on the canvas
Draws a image with data from (img) at (x, y) with dimension (width, height) on 2d context canvas.
var game = new THRUNIUM.Game(400, 400);
game.assets = ['image.png'];
game.init();
game.drawImage(game.assets['image.png'], 100, 100);
game.drawImage(game.assets['image.png'], 100, 100, 200, 200);
// draws text on the canvas