Skeleton Viewer is an example tool that loads and displays 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 all others are based. Even if you aren't using spine-libgdx, if you are having a problem with how your skeletons are rendered at runtime, then the Skeleton Viewer can help to determine if the problem is in spine-libgdx, the runtime you are using, or in your application.
The source code for Skeleton Viewer is provided and can be used as the basis for application-specific tools.
Skeleton Viewer can be run from Spine by using the
--sv command line parameters:
Spine launcher version 4.1.10+ and Spine editor version 4.1.12+ are required. If the command line parameters are not recognized, ensure your Spine editor version is 4.1.12+ and download the latest launcher from your Spine license page.
To run a specific version of Skeleton Viewer, use the
Skeleton Viewer can be downloaded separately and run from a command line.
Download the Skeleton Viewer as a JAR file:
Choose the version that matches the version of the Spine editor you have exported your data from. If you need other versions of the Skeleton Viewer, run from Spine or browse the Git history and run it from source.
Java version 9+ is required to run Skeleton Viewer standalone. It is not necessary to "install" Java. Instead, download the latest version of Java for your OS from Adoptium or Zulu (not from Oracle), extract it to a folder, and run the Java executable found in the
Run Skeleton Viewer standalone from the command line like this:
Browse button is used to open a JSON or binary data file that has been exported from Spine. A data file can also be dragged and dropped on the Skeleton Viewer window.
Both the trial and full versions of Spine are accompanied with example projects that can be exported and opened by Skeleton Viewer. Export files can also be found in the spine-runtimes Git repository.
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.