Asset Pack Editor

In a Phaser game, you load the files using the methods of the Phaser.Loader.LoaderPlugin class. This is how you can load a sprite-sheet file:

this.load.spritesheet('bot', 'images/robot.png', { frameWidth: 32, frameHeight: 38 });

You pass a key ('bot') to identify the file in the game cache, the URL of the file ('images/robot.png') and a sprite-sheet configuration object, with other information like the frame size.

Or you can load the file by passing a single argument, a SpriteSheetFileConfig configuration object:

this.load.spritesheet({
   key: 'bot',
   url: 'images/robot.png',
   frameConfig: {
   frameWidth: 32,
   frameHeight: 38
   }
});

Every file type can be loaded using its configuration object, that is just a JSON object. Following this logic, Phaser has a special type of files that contains the configurations of other files: the Asset Pack file.

You can load an Asset Pack file using the pack(...) method of the loader:

this.load.pack("level1", "assets/pack.json");

The Asset Pack Editor allows you to edit an Asset Pack file, making it very easy to load the assets in your game. Instead of spending precious time writing the JSON file by hand, with the Asset Pack Editor you can load your assets with a visual tool and smart operations.

Asset Pack Editor.

The Asset Pack file is relevant in the IDE for two main reasons: