Definitely. This loads a simple low res imagesheet of a spinning cube, with two sticks in front of it. The sticks are completely stationary. In non-alpha builds, you’ll see the sticks remain stationary. In the alpha build, they’ll move towards/away from each other as the image is stretched.
Altering anchor location doesn’t seem to fix it, but I’m guessing it alters the pivot of the distortion.
In the code I’ve also thrown in a step through of each frame before playing it, with a print out of the imagesheet dimensions per frame. (Can’t access the X1, X2, etc. corners to check those).
spritesheet:
http://img405.imageshack.us/img405/5000/f3yo.png
Main.lua
[lua]
–main.lua
sheetInfo2 = require(“box”)
imageSheet2 = graphics.newImageSheet ( “box.png”, sheetInfo2:getSheet() )
sequenceData2 =
{
{name = “forward”, start = 1, count = 12, loopCount = 100, time = 1200}
}
anim = display.newSprite( imageSheet2, sequenceData2 )
–anim.anchorX =0
–anim.anchorY =0
anim.x = display.contentWidth * .5
anim.y = display.contentHeight * .5
anim:setSequence(“forward”)
for i = 1, 9 do
anim:setFrame (i)
print ("x “…anim.contentWidth…” y "…anim.contentHeight)
end
anim:play()
print (anim.x1)
[/lua]
And the sheet info (generated with texture packer)
[lua]
–box.lua
local SheetInfo = {}
SheetInfo.sheet =
{
frames = {
{
– box_0001
x=2,
y=158,
width=150,
height=154,
sourceX = 40,
sourceY = 120,
sourceWidth = 250,
sourceHeight = 320
},
{
– box_0002
x=2,
y=782,
width=118,
height=154,
sourceX = 53,
sourceY = 120,
sourceWidth = 250,
sourceHeight = 320
},
{
– box_0003
x=284,
y=314,
width=128,
height=154,
sourceX = 60,
sourceY = 120,
sourceWidth = 250,
sourceHeight = 320
},
{
– box_0004
x=2,
y=2,
width=152,
height=154,
sourceX = 44,
sourceY = 120,
sourceWidth = 250,
sourceHeight = 320
},
{
– box_0005
x=144,
y=314,
width=138,
height=154,
sourceX = 46,
sourceY = 120,
sourceWidth = 250,
sourceHeight = 320
},
{
– box_0006
x=154,
y=158,
width=144,
height=154,
sourceX = 51,
sourceY = 120,
sourceWidth = 250,
sourceHeight = 320
},
{
– box_0007
x=308,
y=2,
width=150,
height=154,
sourceX = 43,
sourceY = 120,
sourceWidth = 250,
sourceHeight = 320
},
{
– box_0008
x=2,
y=626,
width=122,
height=154,
sourceX = 52,
sourceY = 120,
sourceWidth = 250,
sourceHeight = 320
},
{
– box_0009
x=2,
y=470,
width=124,
height=154,
sourceX = 62,
sourceY = 120,
sourceWidth = 250,
sourceHeight = 320
},
{
– box_0010
x=156,
y=2,
width=150,
height=154,
sourceX = 45,
sourceY = 120,
sourceWidth = 250,
sourceHeight = 320
},
{
– box_0011
x=2,
y=314,
width=140,
height=154,
sourceX = 44,
sourceY = 120,
sourceWidth = 250,
sourceHeight = 320
},
{
– box_0012
x=300,
y=158,
width=140,
height=154,
sourceX = 52,
sourceY = 120,
sourceWidth = 250,
sourceHeight = 320
},
},
sheetContentWidth = 512,
sheetContentHeight = 1024
}
SheetInfo.frameIndex =
{
[“box_0001”] = 1,
[“box_0002”] = 2,
[“box_0003”] = 3,
[“box_0004”] = 4,
[“box_0005”] = 5,
[“box_0006”] = 6,
[“box_0007”] = 7,
[“box_0008”] = 8,
[“box_0009”] = 9,
[“box_0010”] = 10,
[“box_0011”] = 11,
[“box_0012”] = 12,
}
function SheetInfo:getSheet()
return self.sheet;
end
function SheetInfo:getFrameIndex(name)
return self.frameIndex[name];
end
return SheetInfo
[/lua]