![]() ![]() png file is probably pretty obvious, but let's take a look at the. We will need to load both of these files into the game so you should place them both within the assets folder. Once you upload some images the textbox field in the image above will contain your JSON or XML file. To either XML or JSON-TP-Array depending on whether you want to use XML or JSON (I will be using JSON for the rest of this example) and then download the resulting file as well. You should also change the dropdown box that says 'Text' in the following: If you're using the free tool I mentioned before, you should upload all of the sprites you want to include in the atlas in the box shown below:Īnd download the. png file, and they will also create either a JSON or XML file that describes the coordinates of where each sprite begins and ends so that Phaser will know how to display it.Ĭreate your spriteatlas.png file and spriteatlas.json OR spriteatlas.xml fileĪs I mentioned, there's a variety of ways to do this depending on what tool you use (technically, you could even create yourself by using a program like Photoshop, I wouldn't recommend it though). What these tools will do is arrange all of the sprites you upload into a single. There's also a variety of other tools out there to do this including web based ones and even command line based tools. I've been using this free tool recently which seems to do the job very well. Creating a Texture Atlas for PhaserĪ lot of people use Texture Packer to create sprites and atlases but it is a paid tool after the free trial. I'm going to go over how you can create your own texture atlas and how to use it to create animations in Phaser.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |