Made it more specific to the tile offset.

This commit is contained in:
Craig Whiteside 2018-06-23 16:34:45 +01:00 committed by GitHub
parent a73e47e508
commit 86f1cbcabf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -69,9 +69,9 @@ var CullTiles = function (layer, camera, outputArray)
{
continue;
}
var tileX = tilemapLayer.x + (tile.pixelX * a + tile.pixelY * c + e);
var tileY = tilemapLayer.y + (tile.pixelX * b + tile.pixelY * d + f);
var tileX = ((tile.pixelX + tilemapLayer.x) * a + (tile.pixelY + tilemapLayer.y) * c + e);
var tileY = ((tile.pixelX + tilemapLayer.x) * b + (tile.pixelY + tilemapLayer.y) * d + f);
if (tile.visible &&
tileX >= tCullX &&