Skip to content

Commit 727f8e0

Browse files
committed
Updating the example assetPack.json file.
This commit brings up some needed updates to the `assetPack.json` sample file, including: - The addition of the missing sample entries for the following file types, added in recent versions of Phaser: - a XML file; - an Audiosprite file; - a Video file entries. - Fix the example Bitmap Font entry.
1 parent 89d1072 commit 727f8e0

1 file changed

Lines changed: 25 additions & 3 deletions

File tree

resources/Asset Pack JSON Format/assetPack.json

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@
3737
"url": "assets/level1.json",
3838
"overwrite": false
3939
},
40+
{
41+
// Loads a generic XML document
42+
"type": "xml",
43+
"key": "level-01-definitions",
44+
"url": "assets/data/level-01-definitions.xml",
45+
"overwrite": false
46+
},
4047
{
4148
// Loads a JavaScript File with optional callback
4249
"type": "script",
@@ -62,13 +69,28 @@
6269
"margin": 0,
6370
"spacing": 0
6471
},
72+
{
73+
// Loads a Video File
74+
"type": "video",
75+
"key": "chrome",
76+
"urls": [ "assets/video/chrome.webm", "assets/video/chrome.m4v" ]
77+
},
6578
{
6679
// Loads an Audio File
6780
"type": "audio",
6881
"key": "boden",
6982
"urls": ["assets/audio/bodenstaendig_2000_in_rock_4bit.mp3", "assets/audio/bodenstaendig_2000_in_rock_4bit.ogg"],
7083
"autoDecode": true
7184
},
85+
{
86+
// Loads an Audiosprite file and its metadata
87+
"type": "audiosprite",
88+
"key": "dialog",
89+
"urls": [ "assets/audiosprites/dialog.m4a", "assets/audiosprites/dialog.oga" ],
90+
"jsonURL": "assets/audiosprites/dialog.json"
91+
"jsonData": null,
92+
"autoDecode": true
93+
},
7294
{
7395
// Loads a Tilemap File - in this example a CSV file.
7496
// The format matches Phaser.Tilemap consts.
@@ -99,9 +121,9 @@
99121
{
100122
// Loads a Bitmap Font File.
101123
"type": "bitmapFont",
102-
"key": "ship",
103-
"textureURL": "assets/tilemaps/ship_physics.json",
104-
"xmlURL": "assets/tilemaps/ship_physics.json",
124+
"key": "desyrel",
125+
"textureURL": "assets/fonts/bitmapFonts/desyrel.png",
126+
"xmlURL": "assets/fonts/bitmapFonts/desyrel.xml",
105127
"xmlData": null,
106128
"xSpacing": 0,
107129
"ySpacing": 0

0 commit comments

Comments
 (0)