• Runtimes
  • flipping an animation (spine-js runtime)

  • Modifié
Related Discussions
...

Hi,
I am using the spine-js runtime. The flipped skeleton looks great in the editor (by scaleX=-1 on the root bone) - but once loaded to the spine-js runtime it is distorted as some bones are misplaced or flipped incorrectly. I tried the same with the spineboy example and also had similar issues. Maybe it is something I am missing?

Thanks,
Mark

Screenshots would really help us help you 🙂

Also editor and runtime versions. 🙂

Attached screenshots of the editor and runtime.


Using the spine-js branch, editor version, Editor: 3.3.07

Does that version of the spineboy project use disable inherit scale on the bones? If so, that would be why. You can use Skeleton flipX and flipY instead.

I had the same result with flipX = true.
I see that the inherit scale is checked on the bones. Nate - Is that what you meant?
Anyway - if it wasn't inheriting the scale, doesn't that mean I couldn't scale the animation properly at all?

OK, just saw you are using spine-js. We have deprecated that a few months ago in favor of our new spine-ts runtime (which is as easy to use from JavaScript as the old spine-js runtime). Please update to that, we no longer support spine-js I'm afraid.

4 mois plus tard

Going back now to this issue.
Now i did the following (updated to spine-ts):

  1. Clone spine-ts (master)
  2. Open examples - spienboy - change root scale to -1 in setupmode (see screenshot)
  3. Export (.json, .atlas, .png) to spine-ts/canvas/example/assets
  4. Open the spine-ts project, running index.html of spine-ts/canvas/example/
  5. In editor everything runs correctly, on runtime it is broken. (see browser screenshot)

Editor:

Runtime (browser):

I used:
Spine editor: 3.4.59 Essential
Runtime spine-ts freshly cloned (master of 01.03)

All fixed! As a bonus, Spine-ts canvas now also supports shearing and inherited non-uniform scale. Thanks for reporting!

edit: and alpha tinting is in (RGB still gets ignored, no way to properly composite with canvas)

4 jours plus tard

Thanks a lot!