|
|
|
|
|
|
90
|
pixl.draw_pixl = function(pos, color, options) {
|
90
|
pixl.draw_pixl = function(pos, color, options) {
|
|
91
|
var color = color || pixl.color;
|
91
|
var color = color || pixl.color;
|
|
92
|
pixl.ctx.fillStyle = color;
|
92
|
pixl.ctx.fillStyle = color;
|
|
|
|
93
|
var pos = options.rawValue ? pos : {x: Math.round(pos.x), y: Math.round(pos.y)};
|
|
93
|
var screen_pos = pixl.to_screen(pos);
|
94
|
var screen_pos = pixl.to_screen(pos);
|
|
94
|
pixl.ctx.fillRect(screen_pos.x, screen_pos.y, pixl.size, pixl.size);
|
95
|
pixl.ctx.fillRect(screen_pos.x, screen_pos.y, pixl.size, pixl.size);
|
|
95
|
pixl.world[pos.x + "," + pos.y] = {color: color};
|
96
|
pixl.world[pos.x + "," + pos.y] = {color: color};
|