TiledMap library that is used in TwilightWars game engine.
Check out how it is used in testbed.ts.
let mapResource = new MapResource();
if (load_from_json) {
mapResource.importJson(json);
} else if(load_from_resource) {
mapResource.importAppResource(resourceAlias);
} else if(load_from_base64) { // from source.twmap
mapResource.importBase64(base64);
}
// load textures
mapResource.loadTextures(() => {
// build TiledMap that stores properties of the map
let map: TiledMap = new TiledMap(mapResource);
// build map renderer to display
this.renderer = new MapRenderer(map);
CG.Base.pixi.root.addChild(this.renderer);
});
We use SemVer for versioning.