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

esotericsoftware introduced breaking change causing masks to not work #33

Open daserra opened 1 month ago

daserra commented 1 month 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 1 month 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 1 month 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 1 month 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 1 month 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 1 month 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 1 month 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 1 month ago

Thank you for the quick fix!