Hi,
did you try to deal with Texturepacker and sprite.newSpriteSheetFromData?
[lua]local sheet =
{
frames =
{
{
textureRect = { x = 2, y = 70, width = 50, height = 50 },
spriteTrimmed = true,
spriteColorRect = { x = 38, y = 38 },
spriteSourceSize = { width = 128, height = 128 }
},
{
textureRect = { x = 2, y = 242, width = 50, height = 52 },
spriteTrimmed = true,
spriteColorRect = { x = 38, y = 36 },
spriteSourceSize = { width = 128, height = 128 }
},
}
}[/lua]
http://docs.coronalabs.com/api/library/sprite/newSpriteSheetFromData.html
I did and get quite strange behavior of sprites on scene… When I try to use “older” sprite engine:
[lua] local sheetInfo = require(spritePathData…“test”)
local myImageSheet = graphics.newImageSheet(spritePathImg…“test.png”, sheetInfo.getSheet() )
local sequenceData = {
name=“rotate”,
start=1,
count=36,
time=3000,
}
local testTest = display.newSprite( screenGroup, myImageSheet, sequenceData )
testTest:setReferencePoint( display.CenterReferencePoint )
testTest.x, testTest.y = middleX, middleY[/lua]
all what I get is static screen. It’s load spriteSheet, I can change sprite frame by changing start param in sequenceData but can’t get animate sprite. Should I build function to change sequenceData.start to get it work? It’s quite stupid way to do it…
I really need some tool to deal with sprite on last stable Corona build. My last project for client require 200+ imageSheets with about 36 frames each (kind of 3D products presentation).
[import]uid: 12704 topic_id: 29177 reply_id: 329177[/import]