Initial glitch Spine4 plugin

My game config or how I load the plugin:

var config = {
type: Phaser.AUTO,
width: 720,
height: 1080,
scale: {
mode: Phaser.Scale.FIT,
parent: ‘game-content’,
autoCenter: Phaser.Scale.CENTER_BOTH,
},
scene: [Boot, Load, Home, Level, Game, UIScene],
plugins: {
scene: [
{ key: ‘SpinePlugin’, plugin: window.SpinePlugin, mapping: ‘spine’ }
]
},
}

The problem is, when I add a spine object:

this.add.spine(300, 300, ‘good’, ‘animation’, true);

It’s show the atlas image for a short time (initial creation) then disappear.

How to fix it ?

I use phaser v3.70 and latest SpinePlugin from github

EDIT:

I try to use spine animation in phaser labs example, the result is same, show glitch in the initial creation, but IDK why the example not showing any glitch.

EDIT:

I do a basic test to set it invisible after the creation:

this.add.spine(config.width/2, config.height/2, 'coin-pma', 'animation', true).setVisible(false);

here is the result:

Cicle/coin with black background is the spine image atlas (or source), without .setVisible(false) , the atlas image is shown for a short time (1 frame), then gone.

SOLUTION:

I use Spine 3 and Spine 3 plugin and this issue is not happened

Ensure your Spine version matches EXACTLY the marjor and minor version of spine phaser plugin import.

Also my last attempt I had to use JSON and set the Premultiply alpha in the pack settings to get it working correctly

The glitch also shown if I use spine animation from example (phaser labs)

But this loads ? Phaser 3

I could be your local browser setup. I would ensure you have the latest OS patches, and your web browser and reboot your computer. I assume if you followed the instructions for setup and run of the phaser example repository is should just work ? sometimes it could be a node version issue, check that too

This may offer some info. I received support for this case and I got my spine animation working. There were no errors, it just didn’t show until I got the right configuration for packages installed

Thanks, but it’s not solving my problem, my problem is, the atlas image shown initially then gone, the atlas image should not be shown.

1 Like