I am referring to this example
https://labs.phaser.io/edit.html?src=src\animation\create%20from%20sprite%20config.js
Is it possible to load multiple atlas which then can be used to animate?
I pack my atlas using TexturePacker, PixiJS framework which export the files as png and json.
Using 1 atlas and 1 json works great; but, if I have a huge / a lot of images, it will create multiple png and json.
So how can I load multiple atlas? Is it even possible?
I tried like
this.load.atlas(‘my_atlas’,
[
‘./assets/gameplay/my_atlas_0.png’,
‘./assets/gameplay/my_atlas_1.png’,
‘./assets/gameplay/my_atlas_2.png’
],
[
‘./assets/gameplay/my_atlas_0.json’,
‘./assets/gameplay/my_atlas_1.json’,
‘./assets/gameplay/my_atlas_2.json’,
]);
but doesn’t load right.
I know I can load all 3 of them separately but then how will that work for animation? Since it is referring to one atlas when creating animation for example
this.anims.create({ key: ‘square’, frames: this.anims.generateFrameNames(‘gems’, { prefix: ‘square_’, end: 14, zeroPad: 4 }), repeat: -1 });
Is this example, it loads 1 atlas and generate the frames from that one atlas. But if I have multiple altas loaded separately how will that works when frame 1 to 10 in atlas 1, frame 11 to 20 in atlas 2.
Is there a special loader to load multiple atlas as 1 reference which I can use to create animation using this.anims.create?