![]() Prepend the parent folders name to the frames name. You can use this together with the Indexes option to create spritesheets. To sort the sprites by using a _01.png suffix in the source files. If your source images have extra space (transparent areas) around the picture, then activating these parameters the editor generates a texture that removes that spaces and a JSON file that specify to Phaser to render the sprites with the right spacing. It is useful to remove artifacts from sprites animations, tile sprites, in general when the source images has color pixels in the borders. ![]() It controls the spacing between the sprites. In some platforms this kind of textures performs better. In the second case the editor generates a texture with a size power of 2. You can select Any Size (default) or POT (Power of 2). However you can change the max size of the texture to make space for all the sprites. It is because the texture has no space for all images so it creates another atlas to put there the remaining images. There are cases where the editor generates more than one Phaser (JSON) atlas files. To change these parameters click the “settings icon” in the editor toolbar. Often you should adjust the parameters of the packer to get a texture applicable to the different functions. Texture MAPS can be used in different objects of your game like sprites, tile sprites, sprite-sheets, etc. To load the atlas in your game you can use the () method or load the Asset Pack file. Phaser Editor creates the Design folder and encourages the developers to put there the files are not included in the game but are used to generate the game assets, like is the case of the atlas source images. Also, note the source images are not placed under the WebContent folder else under the Design folder. These are the files you should load in your game. So when you save the editor a myatlas.json and myatlas.png files are generated. The last step, to save, is very important, remember myatlas.atlas file is an internal Phaser Editor file, it is a configuration file used to generate the final JSON atlas and PNG texture file to be used in the game. It generates the Phaser atlas JSON file (with the JSON Hash format) and the texture image (PNG) file. Save the atlas file ( Ctrl+S or File > Save). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |