You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
loader.add("map","path/to/your/map.json").add("atlass","path/to/your/atlass.png) .load(()=>{ const mapData = app.loader.resources["map"].data; const atlas = app.loader.resources["atlass"].spritesheet;
//build manualy from map data and atlass
const stage = CreateStage(atlas, map);
});
I added the json file exported from Tiled, and for the png file added the only tileset image exported with the map. But doing so, the app.loader.resources["atlass"].spritesheet is undefined.
Is the atlass file something else generated by a tool like texturepacker? In that case, is it supposed to have another json file with the same filename in the same directory ? I tried to look into it, but couldn't generate a texturepacker file from my Tiled file for free (cutting the file in 16x16 tiles seems to be a pro-only feature).
What would be the correct way to load only a tiled file ?
The text was updated successfully, but these errors were encountered:
Atlass is source of textures.
Tiled lookup a textures by their names.
atlass should be a json spritesheet.
When is middleware used, it try to load images automatically by their url in atlas data.
Following your example
I added the json file exported from Tiled, and for the png file added the only tileset image exported with the map. But doing so, the
app.loader.resources["atlass"].spritesheet
is undefined.Is the atlass file something else generated by a tool like texturepacker? In that case, is it supposed to have another json file with the same filename in the same directory ? I tried to look into it, but couldn't generate a texturepacker file from my Tiled file for free (cutting the file in 16x16 tiles seems to be a pro-only feature).
What would be the correct way to load only a tiled file ?
The text was updated successfully, but these errors were encountered: