How are Texture Packer coordinates created?

Started by
0 comments, last by tanzanite7 10 years, 1 month ago

<key>logo.png</key>
            <dict>
                <key>frame</key>
                <string>{{257,76},{164,112}}</string>
                <key>offset</key>
                <string>{0,0}</string>
                <key>rotated</key>
                <false/>
                <key>sourceColorRect</key>
                <string>{{0,0},{164,112}}</string>
                <key>sourceSize</key>
                <string>{164,112}</string>
            </dict>

One would expect that 257,76 is the minimum point,and to get the maximum point you add 164 and 112, but it's not! I mean it's weird,some sprites seem to have that type of coord writing,some not! And I did test on sprites that are not rotated, and I always get different results.

Can someone tell me exactly how to actually get the minimum/maximum points?

Advertisement

Never heard of this program, but "sourceColorRect" looked like a Google'able string - and gave:

http://stackoverflow.com/questions/14554846/what-are-offset-and-sourcecolorrect-keys-texturepacker-plist-schema

Which told me that i should add "cocos2d" to the search - and got:

http://gamedev.stackexchange.com/questions/18758/in-cocos2ds-plist-output-what-are-offset-colorsourcerect-and-these-other

Looks to be of help - hope it is.

edit: yep, seems to cover it all.

This topic is closed to new replies.

Advertisement