-
Notifications
You must be signed in to change notification settings - Fork 10
/
cocos2dx.inja
35 lines (35 loc) · 1.26 KB
/
cocos2dx.inja
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
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>{% set texture=first(textures) %}
<key>metadata</key>
<dict>
<key>format</key>
<integer>3</integer>
<key>textureFileName</key>
<string>{{ texture.filename }}</string>
<key>size</key>
<string>{ {{ texture.width }}, {{ texture.height }} }</string>
</dict>
<key>frames</key>
<dict>
## for index in texture.spriteIndices
{% set sprite=at(sprites, index) %}<key>{{ sprite.id }}</key>
<dict>
<key>spriteOffset</key>
<string>{ {{sprite.trimmedSourceRect.x}}, {{sprite.trimmedSourceRect.y}} }</string>
<key>spriteSize</key>
<string>{ {{sprite.trimmedRect.w}}, {{sprite.trimmedRect.h}} }</string>
<key>spriteSourceSize</key>
<string>{ {{sprite.trimmedSourceRect.w}}, {{sprite.trimmedSourceRect.h}} }</string>
<key>textureRect</key>
<string>{ { {{sprite.trimmedRect.x}}, {{sprite.trimmedRect.y}} }, { {{sprite.trimmedRect.w}}, {{sprite.trimmedRect.h}} } }</string>
<key>textureRotated</key>
<{{ sprite.rotated }}/>
<key>anchor</key>
<string>{ {{ sprite.pivot.x / sprite.rect.w }}, {{ sprite.pivot.y / sprite.rect.h }} }</string>
</dict>
## endfor
</dict>
</dict>
</plist>