-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added example for loading assets via json
Signed-off-by: Scott Westover <[email protected]>
- Loading branch information
1 parent
a158650
commit b567882
Showing
16 changed files
with
6,481 additions
and
0 deletions.
There are no files selected for viewing
Binary file added
BIN
+21.7 MB
examples/loading-assets-with-json-pack/assets/audio/xDeviruchi/Title-Theme.wav
Binary file not shown.
83 changes: 83 additions & 0 deletions
83
examples/loading-assets-with-json-pack/assets/data/assets.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
[ | ||
{ | ||
"path": "assets/images/axulart/character", | ||
"files": [ | ||
{ | ||
"type": "spritesheet", | ||
"key": "player", | ||
"url": "custom.png", | ||
"frameConfig": { "frameWidth": 64, "frameHeight": 88 } | ||
} | ||
] | ||
}, | ||
{ | ||
"path": "assets/images/monster-tamer/battle-backgrounds", | ||
"files": [ | ||
{ | ||
"type": "image", | ||
"key": "forest", | ||
"url": "forest-background.png" | ||
} | ||
] | ||
}, | ||
{ | ||
"path": "assets/images/monster-tamer/monsters", | ||
"files": [ | ||
{ | ||
"type": "image", | ||
"key": "carnodusk", | ||
"url": "carnodusk.png" | ||
}, | ||
{ | ||
"type": "image", | ||
"key": "iguanignite", | ||
"url": "iguanignite.png" | ||
}, | ||
{ | ||
"type": "image", | ||
"key": "aquavalor", | ||
"url": "aquavalor.png" | ||
}, | ||
{ | ||
"type": "image", | ||
"key": "frostsaber", | ||
"url": "frostsaber.png" | ||
}, | ||
{ | ||
"type": "image", | ||
"key": "ignivolt", | ||
"url": "ignivolt.png" | ||
}, | ||
{ | ||
"type": "image", | ||
"key": "parazoid", | ||
"url": "parazoid.png" | ||
}, | ||
{ | ||
"type": "image", | ||
"key": "jivy", | ||
"url": "jivy.png" | ||
} | ||
] | ||
}, | ||
{ | ||
"path": "assets/data", | ||
"files": [ | ||
{ | ||
"type": "json", | ||
"key": "item_data", | ||
"url": "items.json" | ||
} | ||
] | ||
}, | ||
{ | ||
"path": "assets/audio/xDeviruchi", | ||
"files": [ | ||
{ | ||
"type": "audio", | ||
"key": "title_theme", | ||
"url": "Title-Theme.wav" | ||
} | ||
] | ||
} | ||
] |
9 changes: 9 additions & 0 deletions
9
examples/loading-assets-with-json-pack/assets/data/items.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[ | ||
{ | ||
"id": 1, | ||
"name": "potion", | ||
"description": "A basic healing item that will heal 30 HP from a single monster.", | ||
"category": "HEAL", | ||
"effect": "HEAL_30" | ||
} | ||
] |
Binary file added
BIN
+5.78 KB
examples/loading-assets-with-json-pack/assets/images/axulart/character/custom.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions
16
examples/loading-assets-with-json-pack/assets/images/axulart/character/license.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Small 8-direction Characters: | ||
Last update: September 15, 2021 | ||
|
||
By: AlexDreamer | ||
https://axulart.itch.io/small-8-direction-characters | ||
https://axulart.tumblr.com/ | ||
|
||
Includes: | ||
8-direction characters sprites (Girl, Boy and Template) | ||
|
||
LICENCE: This asset pack can be used in both free and commercial projects. You can modify it to suit your own needs, as long as you give appropriate credit. You may not redistribute it or resell it. | ||
|
||
Creative Commons License: | ||
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. | ||
|
||
Thank you for download this game-asset & God Bless you :D |
Binary file added
BIN
+384 KB
...-json-pack/assets/images/monster-tamer/battle-backgrounds/forest-background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+15.3 KB
...oading-assets-with-json-pack/assets/images/monster-tamer/monsters/aquavalor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+82.6 KB
...oading-assets-with-json-pack/assets/images/monster-tamer/monsters/carnodusk.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+18.4 KB
...ading-assets-with-json-pack/assets/images/monster-tamer/monsters/frostsaber.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+20.5 KB
...loading-assets-with-json-pack/assets/images/monster-tamer/monsters/ignivolt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+56 KB
...ding-assets-with-json-pack/assets/images/monster-tamer/monsters/iguanignite.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+15.5 KB
...les/loading-assets-with-json-pack/assets/images/monster-tamer/monsters/jivy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+18 KB
...loading-assets-with-json-pack/assets/images/monster-tamer/monsters/parazoid.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6,345 changes: 6,345 additions & 0 deletions
6,345
examples/loading-assets-with-json-pack/assets/js/index-BNWnxF-c.js
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Phaser 3 Example - Loading Assets Via JSON</title> | ||
<style> | ||
html, | ||
body, | ||
.container { | ||
margin: 0px; | ||
height: 100vh; | ||
width: 100vw; | ||
overflow: hidden; | ||
background: #d7d7d7; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
} | ||
</style> | ||
<script type="module" crossorigin src="./assets/js/index-BNWnxF-c.js"></script> | ||
</head> | ||
<body> | ||
<div class="container" id="game-container"> | ||
<h1>Phaser 3 Example: Loading Assets via Pack JSON</h1> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters