Fix image bounds offset

This commit is contained in:
Warr1024 2023-08-30 22:30:39 -04:00 committed by GitHub
parent 6ce3b78207
commit bc7afbd59f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -62,7 +62,7 @@
for (let j = 0; j < data.x_axis; j++) { for (let j = 0; j < data.x_axis; j++) {
const c = "000000" + Math.floor(data.map[i][j]).toString(16); const c = "000000" + Math.floor(data.map[i][j]).toString(16);
ctx.fillStyle = "#" + c.substring(c.length - 6); ctx.fillStyle = "#" + c.substring(c.length - 6);
ctx.fillRect(data.x_axis - j, data.z_axis - i, 1, 1); ctx.fillRect(data.x_axis - j - 1, data.z_axis - i - 1, 1, 1);
} }
} }
}); });