Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What is the atlass file? #4

Open
AdrienLemaire opened this issue Nov 24, 2020 · 1 comment
Open

What is the atlass file? #4

AdrienLemaire opened this issue Nov 24, 2020 · 1 comment

Comments

@AdrienLemaire
Copy link

Following your example

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 ?

@eXponenta
Copy link
Owner

eXponenta commented Feb 4, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants