pixijs / spine-v8

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

esotericsoftware introduced breaking change causing masks to not work #33

Closed daserra closed 1 week ago

daserra commented 3 months ago

Hi guys,

The esotericsoftware team introduced a breaking change by changing a signature of a method from their runtime 4.2.45 to 4.2.56. Now I'm experiencing some issues with masks in all my animations.

On version 4.2.45 we had

clipTriangles(vertices, verticesLength, triangles, trianglesLength, uvs, light, dark, twoColor)  ....

On version 4.2.56 we have

clipTriangles(vertices, triangles, trianglesLength, uvs, light, dark, twoColor) ....
Zyie commented 3 months ago

Hey @davidetan is this a known issue? I was under the assumption that patch versions of spine were not breaking changes, maybe I'm wrong about that?

davidetan commented 3 months ago

Hey @davidetan is this a known issue? I was under the assumption that patch versions of spine were not breaking changes, maybe I'm wrong about that?

That should not have happened. There should be the deprecated version of the function, but it's missing. Let me see what happened and I'll be back here with more info.

davidetan commented 3 months ago

We just published 4.2.57 where we restored the old signature and marked it as deprecated. Sorry for the trouble and thanks for letting us know!

daserra commented 3 months ago

Hi guys thanks for that! Tho that issue is fixed I still have a problem with masks which I believe is related to endSlot.

The animator created an animation where we can reproduce the issue. image Here we expect only the white box to affected by the mask, I'm not that familiar with spine but the animator told me that regarding the drawing order and selecting the endSlot correctly you can achieve that.

For some reason the green boxes are not correctly rendered and are effected by the mask when it shouldn't be.

You can reproduce the issue here

davidetan commented 3 months ago

Hi guys thanks for that! Tho that issue is fixed I still have a problem with masks which I believe is related to endSlot.

The animator created an animation where we can reproduce the issue. image Here we expect only the white box to affected by the mask, I'm not that familiar with spine but the animator told me that regarding the drawing order and selecting the endSlot correctly you can achieve that.

For some reason the green boxes are not correctly rendered and are effected by the mask when it shouldn't be.

You can reproduce the issue here

Thanks for the repro. I've already identified a bug during clipping. I'll give an additional check, then I'll make a PR 👍

davidetan commented 3 months ago

@daserra Just sent a PR: #34 That made me discover another bug. The white square that should disappear, remained stuck in the middle of the jump. The PR fixes also that.

Many thanks for reporting this!

daserra commented 3 months ago

Thank you for the quick fix!

Zyie commented 1 week ago

Hi

We have now moved this project to the official Esoteric Software repo for them to maintain. As a result we will be archiving this repo and closing all issues. If you still are having this issue please feel free to open an issue over on the new repo!

As for migrating between the projects it should be as simple as swapping out the imports from @pxi/spine-pixi to @esotericsoftware/spine-pixi-v8