ソースを参照

round all drawn pixl coordinates by default.

you can disable this, but this won't preserve the imprecise pixls upon
redraw. (because we store the pixls in a very crude way.)
Lucas Stadler 12 年 前
コミット
6e6a135ae1
共有1 個のファイルを変更した1 個の追加0 個の削除を含む
  1. 1 0
      js/pixl/public/index.html

+ 1 - 0
js/pixl/public/index.html

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