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