Phaser __top__: Texturepacker
With TexturePacker, you load one atlas:
// Create a piece covering layer this.layer = this.add.layer(); this.piecesGroup = this.layer.addGroup(); texturepacker phaser
function preload() { // Parameters: Key, TextureURL, AtlasURL this.load.atlas('hero', 'assets/hero.png', 'assets/hero.json'); } Use code with caution. 2. Creating a Sprite from the Atlas With TexturePacker, you load one atlas: // Create
You can create "Multi-Pack" setups if you need different resolutions (e.g., @2x for Retina displays). this.piecesGroup = this.layer.addGroup()
Set to "Trim" to remove transparent pixels without affecting the sprite's relative pivot point.
Select the Phaser (JSON) data format from the framework list.
TexturePacker offers a dedicated "Phaser" data format, which ensures the exported JSON is perfectly compatible with Phaser 3’s loader.