lotterypasob.blogg.se

Texturepacker pngoptimization
Texturepacker pngoptimization










texturepacker pngoptimization

Prepend the parent folders name to the frames name. You can use this together with the Indexes option to create spritesheets.

texturepacker pngoptimization

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).Drag the files and drop them into the atlas editor.Select the image files in the Project Explorer.To add the image files to the atlas follow these steps: One time the atlas file is created and the Atlas Editor is open to editing it then you can start adding images to the atlas. So you should exclude it from a game build, but keep it on your game development source. This file does not contain any relation with Phaser, else it contains Phaser Editor related stuff, like the atlas settings and the path of the source images. When you press Finish, a file myatlas.atlas is created and opened in the Atlas Editor. This container folder should be a sub-folder of the WebContent folder.

Texturepacker pngoptimization generator#

To create an atlas click on File > New > Atlas Generator File, it opens a dialog to set the name of the atlas and the container folder.












Texturepacker pngoptimization