insert skeleton.group into composer sceneGroup problems

I’m using the code for the Corona runtime library

Whenever I insert the skeleton.group to the composer sceneGroup  – the spine images just disappear.

sceneGroup:insert( MenuScene.skeleton.group )​

I have to create a new display group in order to cleanup the images on exiting the scene but I can never add the display group to the composer sceneGroup ! This is irritating when you want to do layer ordering for the entire scene.

What gives?

Anybody can help me with this?

I haven’t tried to put skeleton.group straight into sceneGroup but I’m always putting them into another group which is itself a child of the sceneGroup so it should be possible.

Hey kilopop,

Thanks! I got it to work.

Do you use “spineHelper”? Is that make things easier?

Good stuff. Yeah, a dedicated library such as spineHelper is a good idea. I’ve developed one for my own use. Thare are a few other wrappers out there including my own you can check out at this thread:

https://forums.coronalabs.com/topic/58065-coronalua-runtime-great-optimization-potential/

I can’t get spineHelper to work – it’s no better then when I changed the code myself to load a spritesheet, actually mine was a little better. But all the scaling is wrong when I use spineHelper. Each of the textures are scaled all different crazy scales ugh.

Does spineHelper only work(Or using a spritesheet) if the images are not scaled at all in the spine editor program?

It works, it’s just some of the images a scaled wrong. If I load the images one at a time with no spriteSheet it works perfectly –

What the heck am I doing wrong?

 MenuScene.spineSheetInfo = require( "cindersstep" )    MenuScene.spineSpriteSheet = graphics.newImageSheet( "cindersstep.png", MenuScene.spineSheetInfo:getSheet() )         MenuScene.skeletonData = json:readSkeletonDataFile("cindersstep.json")         MenuScene.skeleton = spine.Skeleton.new( MenuScene.skeletonData)     function MenuScene.skeleton:createImage (attachment )             -- Customize where images are loaded.             local attachment\_name = attachment.name:sub( 8 )             return display.newImageRect( MenuScene.spineSpriteSheet, MenuScene.spineSheetInfo.frameIndex[attachment\_name], attachment.width, attachment.height )             --return display.newImage("cinders\_step\_spine/" .. attachment.name .. ".png")     end​

I figured it out. I have too much padding in my images. I have to crop them to fit exactly around each image. You have to do that to use texture packer.

I haven’t tried to put skeleton.group straight into sceneGroup but I’m always putting them into another group which is itself a child of the sceneGroup so it should be possible.

Hey kilopop,

Thanks! I got it to work.

Do you use “spineHelper”? Is that make things easier?

Good stuff. Yeah, a dedicated library such as spineHelper is a good idea. I’ve developed one for my own use. Thare are a few other wrappers out there including my own you can check out at this thread:

https://forums.coronalabs.com/topic/58065-coronalua-runtime-great-optimization-potential/

I can’t get spineHelper to work – it’s no better then when I changed the code myself to load a spritesheet, actually mine was a little better. But all the scaling is wrong when I use spineHelper. Each of the textures are scaled all different crazy scales ugh.

Does spineHelper only work(Or using a spritesheet) if the images are not scaled at all in the spine editor program?

It works, it’s just some of the images a scaled wrong. If I load the images one at a time with no spriteSheet it works perfectly –

What the heck am I doing wrong?

 MenuScene.spineSheetInfo = require( "cindersstep" )    MenuScene.spineSpriteSheet = graphics.newImageSheet( "cindersstep.png", MenuScene.spineSheetInfo:getSheet() )         MenuScene.skeletonData = json:readSkeletonDataFile("cindersstep.json")         MenuScene.skeleton = spine.Skeleton.new( MenuScene.skeletonData)     function MenuScene.skeleton:createImage (attachment )             -- Customize where images are loaded.             local attachment\_name = attachment.name:sub( 8 )             return display.newImageRect( MenuScene.spineSpriteSheet, MenuScene.spineSheetInfo.frameIndex[attachment\_name], attachment.width, attachment.height )             --return display.newImage("cinders\_step\_spine/" .. attachment.name .. ".png")     end​

I figured it out. I have too much padding in my images. I have to crop them to fit exactly around each image. You have to do that to use texture packer.