Skip to content

Instantly share code, notes, and snippets.

@Bocom
Created June 9, 2012 23:30
Show Gist options
  • Save Bocom/2903036 to your computer and use it in GitHub Desktop.
Save Bocom/2903036 to your computer and use it in GitHub Desktop.
An example animation file
{
"texture": "Link.png",
"size": {
"width": 32,
"height": 48
},
"animations": {
"idle-down": {
"loop": true,
"frames": [
{
"length": 1,
"x": 0,
"y": 0
}
]
},
"idle-right": {
"loop": true,
"frames": [
{
"length": 1,
"x": 0,
"y": 1
}
]
},
"idle-up": {
"loop": true,
"frames": [
{
"length": 1,
"x": 0,
"y": 2
}
]
},
"idle-left": {
"loop": true,
"frames": [
{
"length": 1,
"x": 0,
"y": 3
}
]
},
"moving-down": {
"loop": true,
"frameLength": 0.07,
"frames": [
{
"x": 0,
"y": 0
},
{
"x": 1,
"y": 0
},
{
"x": 2,
"y": 0
},
{
"x": 3,
"y": 0
},
{
"x": 4,
"y": 0
},
{
"x": 5,
"y": 0
},
{
"x": 6,
"y": 0
},
{
"x": 7,
"y": 0
}
]
},
"moving-right": {
"loop": true,
"frameLength": 0.07,
"frames": [
{
"x": 0,
"y": 1
},
{
"x": 1,
"y": 1
},
{
"x": 2,
"y": 1
},
{
"x": 3,
"y": 1
},
{
"x": 4,
"y": 1
},
{
"x": 5,
"y": 1
},
{
"x": 6,
"y": 1
},
{
"x": 7,
"y": 1
}
]
},
"moving-up": {
"loop": true,
"frameLength": 0.07,
"frames": [
{
"x": 0,
"y": 2
},
{
"x": 1,
"y": 2
},
{
"x": 2,
"y": 2
},
{
"x": 3,
"y": 2
},
{
"x": 4,
"y": 2
},
{
"x": 5,
"y": 2
},
{
"x": 6,
"y": 2
},
{
"x": 7,
"y": 2
}
]
},
"moving-left": {
"loop": true,
"frameLength": 0.07,
"frames": [
{
"x": 0,
"y": 3
},
{
"x": 1,
"y": 3
},
{
"x": 2,
"y": 3
},
{
"x": 3,
"y": 3
},
{
"x": 4,
"y": 3
},
{
"x": 5,
"y": 3
},
{
"x": 6,
"y": 3
},
{
"x": 7,
"y": 3
}
]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment