mirror of
https://github.com/photonstorm/phaser
synced 2024-11-10 15:14:47 +00:00
Updated the JSON format.
This commit is contained in:
parent
5b5bdc80d9
commit
5a42a41608
2 changed files with 26 additions and 14 deletions
|
@ -76,7 +76,7 @@ Version 2.0.6 - "Jornhill" - -in development-
|
|||
* ArcadePhysics.Body has a new boolean property `enable`. If `false` the body won't be checked for any collision or overlaps, or have its pre or post update methods called. Use this for easy toggling of physics bodies without having to destroy or re-create the Body object itself.
|
||||
* BitmapData.addToWorld will create a new Phaser.Image object, assign the BitmapData to be its texture, add it to the world then return it.
|
||||
* BitmapData.copyPixels now accepts a Sprite, Image, BitmapData, HTMLImage or string as its source.
|
||||
* Loader.pack will allow you to load in a new Phaser Asset Pack JSON file. An Asset Pack is a specially structured file that allows you to define all assets for your game in an external file. The file can be split into sections, allowing you to control loading a specific set of files from it. An example JSON file can be found in the `resources` folder and examples of use in the Phaser Examples repository.
|
||||
* Loader.pack will allow you to load in a new Phaser Asset Pack JSON file. An Asset Pack is a specially structured file that allows you to define all assets for your game in an external file. The file can be split into sections, allowing you to control loading a specific set of files from it. An example JSON file can be found in the `resources\Asset Pack JSON Format` folder and examples of use in the Phaser Examples repository.
|
||||
* Loader.totalQueuedPacks returns the number of Asset Packs in the queue.
|
||||
* Loader.totalLoadedPacks returns the number of Asset Packs already loaded.
|
||||
|
||||
|
|
|
@ -1,7 +1,12 @@
|
|||
{ "PhaserAssetPack": {
|
||||
|
||||
{
|
||||
// This is the key you use in the call to Phaser.Loader.pack
|
||||
// It's an Array of Loader types.
|
||||
//
|
||||
// Note that lots of parameters are optional.
|
||||
// See the API Documentation to find out which ones as they match the Loader calls exactly.
|
||||
"level1": [
|
||||
{
|
||||
// Loads an image.
|
||||
"type": "image",
|
||||
"key": "ball",
|
||||
"url": "assets/sprites/shinyball.png",
|
||||
|
@ -107,6 +112,7 @@
|
|||
"format": "TEXTURE_ATLAS_JSON_ARRAY"
|
||||
}
|
||||
],
|
||||
// Here's an example of another section within the Asset Pack.
|
||||
"level2": [
|
||||
{
|
||||
"type": "image",
|
||||
|
@ -114,15 +120,21 @@
|
|||
"url": "assets/sprites/shinyball.png",
|
||||
"overwrite": false
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
"meta": {
|
||||
"generated": "04:42 May 29th 2014",
|
||||
"app": "Phaser Asset Packer",
|
||||
"url": "http://phaser.io",
|
||||
"version": "1.0",
|
||||
"copyright": "Photon Storm Ltd. 2014"
|
||||
}
|
||||
|
||||
],
|
||||
// The meta block allows you to define data specific to the Tool / app that created this JSON file.
|
||||
//
|
||||
// generated: Required - String - A Unix Timestamp (or Date.now() from JS) that signifies when this JSON file was created.
|
||||
// version: Required - String - Should be "1.0"
|
||||
// app: Required - String containing the name of the app (or web site) that generated this JSON file.
|
||||
// url: Optional - String containing the URL of the app (or web site) that generated this JSON file.
|
||||
// copyright: Optional - String - A copyright notice.
|
||||
//
|
||||
// You can add as many extra properties as your app requires, only the above are needed / reserved as of 1.0
|
||||
"meta": {
|
||||
"generated": "1401380327373",
|
||||
"version": "1.0",
|
||||
"app": "Phaser Asset Packer",
|
||||
"url": "http://phaser.io",
|
||||
"copyright": "Photon Storm Ltd. 2014"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue