forked from houmain/spright
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphaser2.template
34 lines (34 loc) · 970 Bytes
/
phaser2.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{
"meta": {
"app": "https://github.com/houmain/spright"
},
"frames": [
{% for sprite in sprites %}
{
"filename": "{{ getIdOrFilename(sprite) }}",
"rotated": {{ sprite.rotated }},
"trimmed": {% if sprite.rect.w == sprite.trimmedRect.w and sprite.rect.h == sprite.trimmedRect.h %}false{% else %}true{% endif %},
"sourceSize": {
"w": {{ sprite.sourceRect.w }},
"h": {{ sprite.sourceRect.h }}
},
"spriteSourceSize": {
"x": {{ sprite.trimmedSourceRect.x }},
"y": {{ sprite.trimmedSourceRect.y }},
"w": {{ sprite.trimmedSourceRect.w }},
"h": {{ sprite.trimmedSourceRect.h }}
},
"frame": {
"x": {{ sprite.trimmedRect.x }},
"y": {{ sprite.trimmedRect.y }},
"w": {{ sprite.trimmedRect.w }},
"h": {{ sprite.trimmedRect.h }}
},
"anchor": {
"x": {{ sprite.pivot.x / sprite.rect.w }},
"y": {{ sprite.pivot.y / sprite.rect.h }}
}
}{% if sprite != last(sprites) %},{% endif %}
{% endfor %}
]
}