Template:Fragoria Map
From FragoriaWiki
(Difference between revisions)
Line 53: | Line 53: | ||
var tileRange = 2 << zoom; | var tileRange = 2 << zoom; | ||
- | // | + | // repeat across y-axis (vertically) |
if (y < 0 || y >= tileRange) { | if (y < 0 || y >= tileRange) { | ||
- | + | var y = ((coord.y % numTiles) + numTiles) % numTiles; | |
} | } | ||
- | // | + | // repeat across x-axis |
if (x < 0 || x >= tileRange) { | if (x < 0 || x >= tileRange) { | ||
- | + | var x = ((coord.x % numTiles) + numTiles) % numTiles; | |
} | } | ||
Revision as of 09:41, 3 April 2015