-
-
Notifications
You must be signed in to change notification settings - Fork 647
How to use Texture Atlas with TexturePacker
Olivier Biot edited this page Sep 26, 2015
·
41 revisions
[WIP]
In this tutorial we are gonna to see how to :
- use TexturePacker to create a texture atlas
- import the generated texture into a melonJS project
- add a static sprite
- add an animation
To create a new texture atlas, simply start TexturePacker and select the generic JSON (Array) framework :
Recommended settings :
- use "Power of Two" size for the texture, to optimize the use of GPU memory
- we recommend not to use texture rotation when possible (although this will increase the final texture size), as it forces melonJS to apply a default rotation angle when drawing sprites and, based on how many sprites are to be displayed, can impact performance.
https://github.com/melonjs/melonJS/tree/master/examples/texturepacker