mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-11-28 13:15:30 +01:00
Merge pull request #365 from mikeprimm/master
Don't include face accessory overlay on faces for now - causes 'white face'
This commit is contained in:
commit
e6e07bf421
@ -8,12 +8,13 @@ var cloneCanvas = function(self) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
function blitImage(ctx, image, sx ,sy, sw, sh, dx, dy, dw, dh) {
|
function blitImage(ctx, image, sx ,sy, sw, sh, dx, dy, dw, dh) {
|
||||||
var x; var y;
|
ctx.drawImage(image, sx, sy, sw, sh, dx, dy, dw, dh);
|
||||||
for (x=0;x<dw;x++) {
|
// var x; var y;
|
||||||
for (y=0;y<dh;y++) {
|
// for (x=0;x<dw;x++) {
|
||||||
ctx.drawImage(image,Math.floor(sx+x*(sw/dw)),Math.floor(sy+y*(sw/dw)),1,1,dx+x,dy+y,1,1);
|
// 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) {
|
function createMinecraftHead(player,completed,failed) {
|
||||||
@ -24,7 +25,8 @@ function createMinecraftHead(player,completed,failed) {
|
|||||||
headCanvas.height = 8;
|
headCanvas.height = 8;
|
||||||
var headContext = headCanvas.getContext('2d');
|
var headContext = headCanvas.getContext('2d');
|
||||||
blitImage(headContext, skinImage, 8,8,8,8, 0,0,8,8);
|
blitImage(headContext, skinImage, 8,8,8,8, 0,0,8,8);
|
||||||
blitImage(headContext, skinImage, 40,8,8,8, 0,0,8,8);
|
// Turn off accessory face overlay - causes white faces, and very few skins seem to have them anyway
|
||||||
|
//blitImage(headContext, skinImage, 40,8,8,8, 0,0,8,8);
|
||||||
completed(headCanvas);
|
completed(headCanvas);
|
||||||
};
|
};
|
||||||
skinImage.onerror = function() {
|
skinImage.onerror = function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user