Dear Spine Support Team,
I am developing a game using Phaser 3 (version 3.88.2) with the Spine plugin (@esotericsoftware/spine-phaser@4.2.74, @esotericsoftware/spine-core@4.2.70) and encountering a rendering glitch with SpineGameObject. When creating a SpineGameObject (via new SpineGameObject or scene.add.spine), the PNG textures briefly appear distorted on the screen. In cases where the Spine object is not manipulated after creation (e.g., no visibility changes or animations), it remains visible until the Spine is officially displayed.
// Method 1
const spine = new SpineGameObject(this.scene, this.scene.spine, x, y, assetName, `${assetName}_atlas`);
// Optionally: spine.setVisible(false);
// Method 2
const spine = this.scene.add.spine(x, y, assetName, `${assetName}_atlas`);
// Optionally: spine.setVisible(false);
The PNG textures appear distorted for a few milliseconds upon creation.
If the Spine object is not further manipulated (e.g., not added to the scene or animated), it persists on the screen until the Spine is displayed.
The issue occurs during preloading, as I must create Spine objects in advance.
Questions:
- Is this a known issue with spine-phaser@4.2.74 where PNG textures display before initialization or persist if not manipulated?
- Are there best practices for preloading SpineGameObject to avoid this glitch and ensure it remains hidden until needed?
- Can rendering be deferred until the Spine is explicitly displayed?
Please let me know if you need a reproducible example or additional details. Thank you for your support!
Best regards
