pixijs / spine-v8

PixiJS v8 port of the official spine runtime
https://pixijs.io/spine-v8/examples/
MIT License
27 stars 3 forks source link

Spine Animation that works on pixi 7 and 6 doesn't work on pixi 8 #26

Open apelev opened 2 months ago

apelev commented 2 months ago

Hello guys. I am currently trying to run some spine animations after migration from pixi 7 to pixi 8. Some weird artifacts appear (looks like scaling or improper reading of the spritesheet coordinates). I am attaching a screenshot of a moment when such artifact appears. The fiery outline should appear on the lemon, not "moved" away from it. The interesting thing is that if I enable the spine debug with the following setup( everything is disabled), the animation starts to appear properly. Once I disable the debugger it bugs again.


public static attachSpineDebug(spine: Spine): void {
    const debug = new SpineDebugRenderer();

    debug.drawRegionAttachments = false;
    debug.drawMeshTriangles = false;
    debug.drawMeshHull = false;
    debug.drawBones = false;
    debug.drawPaths = false;
    debug.drawBoundingBoxes = false;
    debug.drawClipping = false;
    debug.drawEvents = false;
    spine.debug = debug;
  }

how it is >>>> image

I have tried several combinations of pixijs and spine v8 plugin but none seem to fix the issue. Currently trying with pixi 8.2^ and spine pixi 2.0.2. The spine version is 4.2.33

We tried exporting in several different formats and versions from the spine editor and none seem to work. The animation itself runs fine in spine editor and as I previously mentioned with pixi 7 and pixi 6.

Any ideas what could possibly be done to fix this issue ? I can also provide the animation in private if it would help

sbyps commented 1 month ago

+1

davidetan commented 1 month ago

That's difficult to debug without the animation. I can work on that, if you can provide the animation to me.

apelev commented 1 month ago

That's difficult to debug without the animation. I can work on that, if you can provide the animation to me.

Hello, mate. Here is a WeTransfer link to it https://we.tl/t-10IEYNR8Yp

davidetan commented 1 month ago

Thanks for providing your asset. I was able to find the problem and a solution and I just quickly created a draft PR. More info into the PR here: https://github.com/pixijs/spine-v8/pull/31

Tomorrow, I'll see if I can do that in a cleaner way.

sbyps commented 1 month ago

i also get some problem,when i use this spine resource below with pixi8 + @pixi/spine-pixi 2.0.2 + spine version 4.2 output files, cannot render as well like pixi7 + pixi-spine4.0.4 + spine version 4.1 output files; this files below are in spine version 4.2; https://conan-online.cretacontent.com/webapp/conan-math-page/little-teacher/v4/little_teacher.skel https://conan-online.cretacontent.com/webapp/conan-math-page/little-teacher/v4/little_teacher.atlas https://conan-online.cretacontent.com/webapp/conan-math-page/little-teacher/v4/little_teacher.png

this files below are in spine version 4.1; https://conan-online.cretacontent.com/webapp/conan-math-page/little-teacher/v3/little_teacher.skel https://conan-online.cretacontent.com/webapp/conan-math-page/little-teacher/v3/little_teacher.atlas https://conan-online.cretacontent.com/webapp/conan-math-page/little-teacher/v3/little_teacher.png

@davidetan

davidetan commented 1 month ago

@sbyps What do you mean with

cannot render as well

?

Can you point out the differences?