Skip to content

[3.50-beta13] Initial glitch in Spine animation #5443

@spayton

Description

@spayton

Version

  • Phaser Version: 3.50-beta12/13 (and probably a lot of previous versions)
  • OS/Browser: Win10 Chrome

Description

When a hidden spine is made visible and an animation started, the first frame of animation seen is not the expected first frame of animation.

This glitch depends on when the spine was made visible and animated, it will be a problem if this is triggered after the normal spine update. Triggering from a tween completion callback is one such situation where the glitch will show itself. The glitch is that the spine momentarily appears in its last state at the start of it's animation.

If the spine is made visible and animated, in a tween completion callback, the spine will miss its preUpdate() before its render() is called, critically this misses the spine.state.apply(skeleton) resulting in the glitch on the first render.

However, if the spine is made visible and animated on a pointerup event, then the glitch doesn't occur because the trigger occured outside the normal step processing, thus the normal step processing subsequently occurs from the start, ie step -> sceneManager.update -> etc, thus the spine.preUpdate() gets called before the first render().

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions