mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-12-28 19:47:45 +01:00
Merge pull request #368 from mikeprimm/master
Go back to pixel by pixel blit - makes webkit browsers less fuzzy
This commit is contained in:
commit
d6388aab31
@ -8,13 +8,12 @@ var cloneCanvas = function(self) {
|
||||
};
|
||||
|
||||
function blitImage(ctx, image, sx ,sy, sw, sh, dx, dy, dw, dh) {
|
||||
ctx.drawImage(image, sx, sy, sw, sh, dx, dy, dw, dh);
|
||||
// var x; var y;
|
||||
// for (x=0;x<dw;x++) {
|
||||
// for (y=0;y<dh;y++) {
|
||||
// ctx.drawImage(image,Math.floor(sx+x*(sw/dw)),Math.floor(sy+y*(sw/dw)),1,1,dx+x,dy+y,1,1);
|
||||
// }
|
||||
// }
|
||||
var x; var y;
|
||||
for (x=0;x<dw;x++) {
|
||||
for (y=0;y<dh;y++) {
|
||||
ctx.drawImage(image,Math.floor(sx+x*(sw/dw)),Math.floor(sy+y*(sw/dw)),1,1,dx+x,dy+y,1,1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function createMinecraftHead(player,completed,failed) {
|
||||
|
Loading…
Reference in New Issue
Block a user