Add support for simple periodic sprite animations
This commit is contained in:
parent
426b2c37ff
commit
b83b596b0f
7 changed files with 90 additions and 22 deletions
23
dist/resources/entity/square.json
vendored
Normal file
23
dist/resources/entity/square.json
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"sprite": "square",
|
||||
"collision": [
|
||||
{
|
||||
"type": "polygon",
|
||||
"vertices": [
|
||||
[-0.46875, -0.46875],
|
||||
[-0.46875, 0.46875],
|
||||
[0.46875, 0.46875],
|
||||
[0.46875, -0.46875]
|
||||
]
|
||||
}
|
||||
],
|
||||
"frames": 4,
|
||||
"animation": {
|
||||
"sequence": [
|
||||
[500, 0],
|
||||
[500, 1],
|
||||
[500, 2],
|
||||
[500, 3]
|
||||
]
|
||||
}
|
||||
}
|
BIN
dist/resources/sprite/entity/square.png
vendored
BIN
dist/resources/sprite/entity/square.png
vendored
Binary file not shown.
Before Width: | Height: | Size: 808 B After Width: | Height: | Size: 528 B |
Reference in a new issue