From 4db43da67888eb71ed706046cb13735d96286048 Mon Sep 17 00:00:00 2001 From: Nathan Sweet Date: Sat, 31 May 2025 12:42:38 -0400 Subject: [PATCH] [libgdx] Pose the skeleton for FboTest. --- .../src/com/esotericsoftware/spine/FboTest.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/spine-libgdx/spine-libgdx-tests/src/com/esotericsoftware/spine/FboTest.java b/spine-libgdx/spine-libgdx-tests/src/com/esotericsoftware/spine/FboTest.java index 3e91f629f..81e97065f 100644 --- a/spine-libgdx/spine-libgdx-tests/src/com/esotericsoftware/spine/FboTest.java +++ b/spine-libgdx/spine-libgdx-tests/src/com/esotericsoftware/spine/FboTest.java @@ -42,6 +42,8 @@ import com.badlogic.gdx.graphics.g2d.TextureRegion; import com.badlogic.gdx.graphics.glutils.FrameBuffer; import com.badlogic.gdx.utils.ScreenUtils; +import com.esotericsoftware.spine.Animation.MixBlend; +import com.esotericsoftware.spine.Animation.MixDirection; import com.esotericsoftware.spine.utils.TwoColorPolygonBatch; /** Demonstrates rendering an animation to a frame buffer (FBO) and then rendering the FBO to the screen. */ @@ -75,6 +77,12 @@ public class FboTest extends ApplicationAdapter { // Create a skeleton instance, set the position of its root bone, and update its world transform. skeleton = new Skeleton(skeletonData); skeleton.setPosition(250, 20); + + // Apply the pose for the first frame of the run animation. + Animation animation = skeleton.getData().findAnimation("run"); + animation.apply(skeleton, -1, 0, true, null, 1, MixBlend.first, MixDirection.in, false); + + // Compute the world transform for the pose. skeleton.updateWorldTransform(Physics.update); // Create an FBO and a texture region with Y flipped.