Created
September 14, 2012 13:24
-
-
Save rossy/3721881 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require("child_process").spawn( | |
"montage", | |
require("fs") | |
.readdirSync(".") | |
.map(function(a) { | |
return a.match(/^.*_Tile_([-\d]{3})_([-\d]{3})_LOD0\.dds$/); | |
}) | |
.filter(function(a) { return a; }) | |
.sort(function(a, b) { | |
var x1 = Number(a[1]), | |
y1 = Number(a[2]), | |
x2 = Number(b[1]), | |
y2 = Number(b[2]); | |
if (y1 == y2) | |
return x1 - x2; | |
else | |
return y1 - y2; | |
}) | |
.map(function(a) { | |
return a[0]; | |
}) | |
.concat(["-geometry", "+0+0", "-tile", "32x32", "out.png"]) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is it just me or are all the Indar_Tile tiles upside down? It seems they all need to be flipped vertically...