-
Notifications
You must be signed in to change notification settings - Fork 1
/
spritesheet.tpl
37 lines (37 loc) · 1.18 KB
/
spritesheet.tpl
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
{
"meta": {
"app": "Scuti Extractor",
"format": "RGBA8888",
"image": "<%= layout.name %>.png",
"scale": "1.0",
"size": {
"w": <%= layout.width %>,
"h": <%= layout.height %>
},
"version": "1.0"
},
"frames": {
<% layout.images.forEach(function (image, idx) {
if (image.className.indexOf('-') >= 0) { %>'<%= image.className %>'<% } else { %>"<%= image.className %>"<% } %>: {
"frame": {
"x": <%= image.x %>,
"y": <%= image.y %>,
"w": <%= image.width %>,
"h": <%= image.height %>
},
"sourceSize": {
"w": <%= image.width %>,
"h": <%= image.height %>
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": <%= image.width %>,
"h": <%= image.height %>
},
"rotated": false,
"trimmed": true
}<% if (idx !== layout.images.length - 1) { %>,<% } %>
<% }); %>
}
}