• Runtimes
  • Rendering Glitch with SpineGameObject Persisting Until Display in Phaser 3

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:

  1. Is this a known issue with spine-phaser@4.2.74 where PNG textures display before initialization or persist if not manipulated?
  2. Are there best practices for preloading SpineGameObject to avoid this glitch and ensure it remains hidden until needed?
  3. 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

  • Davide ответили на это сообщение.
    Related Discussions
    ...

    momi

    The issue you're mentioning should be resolved in version 4.2.75 with this commit.

    I highly recommend switching to spine-phaser-v3 version 4.2.79, which includes the fixes you requested in the other thread.

    Dear Davide,

    Thank you for your assistance with my Phaser 3 (version 3.88.2) project, currently using @esotericsoftware/spine-phaser@4.2.74 and @esotericsoftware/spine-core@4.2.70. You recommended using spine-phaser-v3@4.2.79, but I couldn’t find this version on npm or GitHub, with the latest available being 4.2.76.

    Could you kindly clarify where I can access spine-phaser-v3@4.2.79 and confirm if it is compatible with Phaser 3.88.2 and my current setup?

    I greatly appreciate your support!

    • Davide ответили на это сообщение.

      momi

      There was an issue building that version. Just use the latest version.