Tiled Map is a plugin for Crafty.js for loading tiled maps (from Tiled Map Editor) and use them on a Crafty scene.
Crafty.scene('Main', function () {
var mapLoader = new Crafty.TiledMap('url/to/tiled/map.json');
mapLoader.downloaded(function (err, json) {
// Errors on downloading json comes here.
if (err) throw err;
var map = Crafty.e('TiledMap');
// Create entities based on json;
map.setTiledMap(JSON.parse(json));
// Optionally, you can change Crafty camera to follow the given entity,
// caching not visible tiles.
map.cameraFollow(Crafty('Player'));
});
});
WIP
This plugin is based on Jonas Olmstead's post about tiled maps; and an old crafty.js component for tiled map editor (I couldn't find the link ): )