@meirmsn sorry for the late reply, I was on vacation!
When you create a
SpineGameObject it needs to somehow calculate its own width and height. By default, the object will do so based by calculating a bounding rectangle that encloses all attachments visible in the setup pose of the skeleton. Those are the attachments of the default skin.
As I understand, your skeleton has an empty default skin, so there aren't any attachments on it without setting a skin? In that case, the bounds can not be calculated, so you get infinite width and height. I've just fixed this up so that in this case, width and height will be 0 instead.
If you do not have visible attachments in the setup pose, you can pass a
BoundsProvider to the
SpineGameObject constructor. Here's how that looks like with our mix-and-match example, which also has an empty default skin:
const mixAndMatch = this.add.spine(400, 500, 'mix-and-match-data', "mix-and-match-atlas", new spine.SkinsAndAnimationBoundsProvider(null, ["full-skins/girl"]));
SpineGameObject calculates its bounds, it will ask the
SkinsAndAnimationBoundsProvider to do the actual calculation. The
SkinsAndAnimationBoundsProvider is given a skin called
full-skin/girl, from which it will set the attachments and then calculate the bounds. The width and height of the
SpineGameObject will then be those found in the bounds.
You can do the same for your use case: just use a
SkinsAndAnimationBoundsProvider and give it a list of skins which it should set on the skeleton to calculate the bounds with.