Fix a typo in tileset detection
This commit is contained in:
parent
47313521ed
commit
34e430e8a1
@ -3141,7 +3141,7 @@ export function infer_tileset_from_image(img, make_canvas) {
|
|||||||
// XXX this assumes square tiles, but i have written mountains of code that doesn't!
|
// XXX this assumes square tiles, but i have written mountains of code that doesn't!
|
||||||
if (w / h === aspect_ratio) {
|
if (w / h === aspect_ratio) {
|
||||||
let image_data = ctx.getImageData(0, 0, canvas.width, canvas.height);
|
let image_data = ctx.getImageData(0, 0, canvas.width, canvas.height);
|
||||||
let did_anything = erase_tileset_background(image_data.data, layout);
|
let did_anything = erase_tileset_background(image_data, layout);
|
||||||
let tw = Math.floor(canvas.width / w);
|
let tw = Math.floor(canvas.width / w);
|
||||||
let th = Math.floor(canvas.height / h);
|
let th = Math.floor(canvas.height / h);
|
||||||
if (layout['#ident'] === 'tw-static') {
|
if (layout['#ident'] === 'tw-static') {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user