forked from houmain/spright
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphaser.template
47 lines (47 loc) · 1.23 KB
/
phaser.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
35
36
37
38
39
40
41
42
43
44
45
46
47
{
"meta": {
"app": "https://github.com/houmain/spright"
},
"textures": [
{% for texture in textures %}
{
"image": "{{ texture.filename }}",
"format": "RGBA8888",
"size": {
"w": {{ texture.width }},
"h": {{ texture.height }}
},
"scale": 1,
"frames": [
{% for sprite in texture.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 %}
]
}
{% endfor %}
]
}