Skeleton Viewer is a tool that can load and display skeleton data. It is very similar to the Preview view and can be useful for testing how skeleton data exported from Spine is rendered using a Spine Runtime.
Skeleton Viewer uses the spine-libgdx runtime, which is the reference Spine runtime upon which the others are based. Even if you aren't using spine-libgdx, if you are having a problem with how any runtime is rendering a skeleton then the Skeleton Viewer can help to determine if the problem is in spine-libgdx, the runtime you are using, or in your code.
The source code for Skeleton Viewer is available here.
The Skeleton Viewer can be downloaded here as a JAR file:
Choose the version that matches the version of the Spine editor you have exported your data from. If you need older versions of the Skeleton Viewer, you can browse the Git history and run it from source.
Java is required to run Skeleton Viewer. Once you have Java, usually you can run Skeleton Viewer by just double clicking the JAR file. If not, run it from the command line like this:
Running from the command line has the benefit that you can see any error logs that may be output.
Browse button is used to open a JSON or binary data file that has been exported from Spine. Both the trial and full version of Spine are accompanied with example exports that the Skeleton Viewer can open. These can be found in the Spine or Spine Trial installation directory.
Skeleton Viewer looks for a texture atlas with the same name, next to the chosen data file. For example, if
raptor.json is opened, it will look for
raptor.atlas. If the atlas is not found, translucent white squares will be used instead of images.
Skeleton Viewer monitors the data and atlas files and automatically reloads them if they are changed externally.
If you are running Skeleton Viewer from the command line, you can directly specify the skeleton
.skel to open:
The chosen skeleton is loaded and shown in the black area on the right. Click and drag in this area to move the skeleton. The
Debug controls can be used to better visualize the different parts of the skeleton.
If the images have a dark edge or otherwise don't appear correctly, try checking or unchecking
Premultiplied. When checked, rendering expects the atlas to have been created using premultiplied alpha.
The animation selected in the
Animation list will be played. Selecting a different animation will use AnimationState to cross fade to the new animation. The
Mix slider controls the cross fade duration in seconds.
Setup Pose buttons resets the bones, slots or both to the setup pose. This is the same as calling
setSlotsToSetupPose. When an animation makes changes to a skeleton, the changes persist until your code or another animation changes them. Since an animation only makes changes to the parts of a skeleton it has keys for, the result may be that an animation unintentionally affects another. See Animation changes for more.