This is a helper library to import Tiled map editor JSON files into sim-ecs
$ npm install sim-ecs-tiled
A map can easily be loaded anytime by passing the json data as object:
const mapObject = (await fetch('/path/to/my-map.tmj')).json();
// From prep world:
prepWorld.load(await loadMap(mapObject));
// From state
class MyState extends State {
async create(actions: ITransitionActions) {
actions.commands.load(await loadMap(mapObject));
}
// same for other methods...
}