I have actualy two images for two animations.
imgsheet1=graphics.newImageSheet("img1.png",{width=425,height=390,numFrames=3,sheetContentWidth=425,sheetContentHeight=1170}) imgsheet2=graphics.newImageSheet("img2.png",{width=415,height=390,numFrames=5,sheetContentWidth=415,sheetContentHeight=1950})
To reduce the textureMemory I made with TexturePacker one image. It produce the png file and the lua file.
The problem it consider I have two frames.
I try to do this but I don’t understand how work “sourceX”,“sourceY”,“sourceWidth”,“sourceHeight” on graphics.newImageSheet()
local imgsheet1=graphics.newImageSheet("cav1.png",{width=512,height=512,numFrames=4,sourceX=0,sourceY=0,sourceWidth=512,sourceHeight=2048,sheetContentWidth=1024,sheetContentHeight=2048}) local imgsheet2=graphics.newImageSheet("cav1.png",{width=512,height=512,numFrames=4,sourceWidth=512,sourceX=512,sourceY=0,sheetContentWidth=1024,sheetContentHeight=2048})
The fact I put in two imageSheet for one png it take the same size on texture memory as a single imagesheet.
Any one can help me?
Rémi