azerion / phaser-spine

A plugin for Phaser 2 that adds Spine support
MIT License
121 stars 57 forks source link

Scaling Down Bones and Assets #58

Closed shibekin69 closed 6 years ago

shibekin69 commented 7 years ago

Hey guys,

This is a tip. In case you've got a huge animation and assets and have issues scaling it down because it's too slow on Phaser, here's what worked for me:

Let's say you need to scale it down to 60% or 0.6 from 100%.

  1. On your original PSD file, resize image to 60%.
  2. Export to Spine-ready PNGs using the Extend Toolkit Script
  3. Export your JSON (100% size).
  4. Now that you've got a smaller set of assets in its own directory, it's time to deal with the bone. In the Spine Editor, do [IMPORT DATA] and import the JSON file from step 3.
  5. Select your .spine file. Under scale, select 0.6 or 60% to match our asset size.
  6. Once it's in, under [IMAGES], select the directory where your smaller exported images are from Step 2.
  7. Go to the root, you'll see X and Y scales are set to 0.6. Set these to 1.0 and 1.0.
  8. Done! You should now have a skeleton with animations that fit your new image assets.
AleBles commented 7 years ago

You've been contributing a lot, if you want I can give you developer access so you can set up stuff like this into the github wiki of this project :)

shibekin69 commented 7 years ago

Ah thanks, but I'll pass man. I don't test my stuff out thoroughly, might pass of flawed info. Like this one just now, the bones and animations might appear all right in the editor, but once it's in phaser, I noticed that animations are slightly screwed. Let me see if a re-export and import might help.

shibekin69 commented 7 years ago

Ah ok, nevermind what I said. This technique works. Just forgot to set starting keys at the start of important animated parts in each animation .

AleBles commented 6 years ago

Added to the F.A.Q.