Merge pull request #2161 from N8n5h/light-fix

Remove redundant 0 check when computing tile offset
This commit is contained in:
Lubos Lenco 2021-04-18 16:58:59 +02:00 committed by GitHub
commit 6d4952624a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -161,8 +161,8 @@ class Inc {
// set the tile offset for this tile and every linked tile to this one
var j = 0;
tile.forEachTileLinked(function (lTile) {
tile.light.tileOffsetX[j] = (lTile.coordsX == 0) ? 0.0 : lTile.coordsX / atlas.sizew;
tile.light.tileOffsetY[j] = (lTile.coordsY == 0) ? 0.0 : lTile.coordsY / atlas.sizew;
tile.light.tileOffsetX[j] = lTile.coordsX / atlas.sizew;
tile.light.tileOffsetY[j] = lTile.coordsY / atlas.sizew;
tile.light.tileScale[j] = lTile.size / atlas.sizew;
j++;
});