From 76831e88eceeeed2c5dbc442f9b60b3b9190acf0 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 1 Feb 2024 12:23:08 +0000 Subject: [PATCH] The Spine 4.1 Plugin will now call `preUpdate` automatically when the `play` method is called. This forces the new animation state to update and apply itself to the skeleton. This fixes an issue where Spine object would show the default frame in the Spine atlas for a single update before the animation started. Fix #5443 --- plugins/spine4.1/src/gameobject/SpineGameObject.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/spine4.1/src/gameobject/SpineGameObject.js b/plugins/spine4.1/src/gameobject/SpineGameObject.js index 384f9db2a..a19e9b09c 100644 --- a/plugins/spine4.1/src/gameobject/SpineGameObject.js +++ b/plugins/spine4.1/src/gameobject/SpineGameObject.js @@ -995,6 +995,8 @@ var SpineGameObject = new Class({ { this.setAnimation(0, animationName, loop, ignoreIfPlaying); + this.preUpdate(0, 16.6); + return this; },