Advertisement
Guest User

Untitled

a guest
Sep 27th, 2014
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.19 KB | None | 0 0
  1. # Overview
  2.  
  3. Skeleton Viewer is a tool that can load and display skeleton data. This can be useful for testing how skeleton data exported from Spine is rendered in an actual runtime.
  4.  
  5. ![](/img/skeleton-viewer.jpg)
  6.  
  7. Skeleton Viewer uses the [spine-libgdx](https://github.com/EsotericSoftware/spine-runtimes/tree/master/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.
  8.  
  9. The source code for Skeleton Viewer is available [here](https://github.com/EsotericSoftware/spine-runtimes/blob/master/spine-libgdx/test/com/esotericsoftware/spine/SkeletonViewer.java).
  10.  
  11. # Running Skeleton Viewer
  12.  
  13. The Skeleton Viewer can be downloaded here as a JAR file:
  14.  
  15. [Skeleton Viewer download](esotericsoftware.com/files/skeletonViewer.jar)
  16.  
  17. [Java](http://www.java.com/) is required to run the tool. Usually you can run it by double clicking the JAR file. If not, run it from the command line like this:
  18.  
  19. ```
  20. java -jar skeletonViewer.jar
  21. ```
  22.  
  23. Running from the command line has the benefit that you can see any error logs that may be output.
  24.  
  25. # Loading data
  26.  
  27. The `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.
  28.  
  29. 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.
  30.  
  31. Skeleton Viewer monitors the data and atlas files and automatically reloads them if they are changed externally.
  32.  
  33. # Using Skeleton Viewer
  34.  
  35. 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 `Scale`, `Flip` and `Debug` controls can be used to better visualize the different parts of the skeleton.
  36.  
  37. 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.
  38.  
  39. The animation selected in the `Animation` list will be played. Selecting a different animation will use [AnimationState](http://esotericsoftware.com/spine-using-runtimes#AnimationState) to cross fade to the new animation. The `Mix` slider controls the cross fade duration in seconds.
  40.  
  41. The `Setup Pose` buttons resets the bones, slots or both to the setup pose. This is the same as calling `setBonesToSetupPose` or `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](http://esotericsoftware.com/spine-using-runtimes/#Animation-changes) for more.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement