refactor: simple

This commit is contained in:
cha0s 2022-04-15 19:44:06 -05:00
parent 2d1b3400fd
commit 1a8e4c5b89

View File

@ -29,13 +29,7 @@ export default class TilesView extends Container {
chunksForExtent([x, y, w, h]) {
const [tw, th] = this.tiles.tileSize;
/* eslint-disable no-param-reassign */
x /= tw;
w /= tw;
y /= th;
h /= th;
/* eslint-enable no-param-reassign */
return this.chunksForUnitExtent([x, y, w, h]);
return this.chunksForUnitExtent([x / tw, y / th, w / tw, h / th]);
}
chunksForUnitExtent([x, y, w, h]) {