Skip to content

Instantly share code, notes, and snippets.

@lcolladotor
Created August 27, 2014 19:25
Show Gist options
  • Save lcolladotor/cb98766e058c2bbd3385 to your computer and use it in GitHub Desktop.
Save lcolladotor/cb98766e058c2bbd3385 to your computer and use it in GitHub Desktop.
buildTileArray = function() {
geomorphicTilesArray = new Array();
var count = 0
_.each(geomorphicTilesTableItems, function(geomorphicTilesTableItemsEach) {
obj = _.find(geomorphicTilesInformation, function(obj) {return obj.tileName == geomorphicTilesTableItemsEach.get("name");});
if(obj.blocked == false){
geomorphicTilesArray.push({
tileName: geomorphicTilesTableItemsEach.get("name"),
tileURL: geomorphicTilesTableItemsEach.get("avatar").replace("med.jpg?","thumb.jpg?"),
edge: obj.edge,
corner: obj.corner,
entrance: obj.entrance,
type: obj.type,
rotation: obj.rotation,
rarity: obj.rarity,
blocked: obj.blocked,
side: count
});
count++
};
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment