optimized TexturePacker code?

I'm trying to consolidate and optimize code right now, and I've been modifying the Lua that Texture Packer publishes. Just wondering if there is any reason what I'm doing is poor practice.

The default output is this:

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
local SpriteSheet = {}
SpriteSheet.getSpriteSheetData = function ()
        return {
                frames = {
                        {
                                name = "chair1.png",
                                spriteColorRect = { x = 0, y = 0, width = 43, height = 58 },
                                textureRect = { x = 0, y = 0, width = 43, height = 58 },
                                spriteSourceSize = { width = 43, height = 60 },
                                spriteTrimmed = true,
                                textureRotated = false
                        },
                        {
                                name = "chair2.png",
                                spriteColorRect = { x = 0, y = 0, width = 43, height = 58 },
                                textureRect = { x = 43, y = 0, width = 43, height = 58 },
                                spriteSourceSize = { width = 43, height = 60 },
                                spriteTrimmed = true,
                                textureRotated = false
                        },
                        {
                                name = "chair3.png",
                                spriteColorRect = { x = 4, y = 8, width = 39, height = 52 },
                                textureRect = { x = 86, y = 0, width = 39, height = 52 },
                                spriteSourceSize = { width = 43, height = 60 },
                                spriteTrimmed = true,
                                textureRotated = false
                        },
                }
        }
end
return SpriteSheet
views:1485 update:2011/11/10 9:30:09
corona forums © 2003-2011