Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mask problem in Spine #88

Open
eugene1kolombet opened this issue May 18, 2024 · 0 comments
Open

Mask problem in Spine #88

eugene1kolombet opened this issue May 18, 2024 · 0 comments

Comments

@eugene1kolombet
Copy link

Dear Mr. mvaligursky

Here's my conclusion: you are using an outdated Spine library.
Now for the details.
In the provided example, there are 2 objects drawn, a circle and a square, along with a mask.
The code that iterates through the Spine slots:
for (let i = 0; i < count; i++) {
const slot = drawOrder[i];
follows the logic of the original (https://github.com/EsotericSoftware/spine-runtimes/blob/3.7/spine-ts/webgl/src/SkeletonRenderer.ts) except for:

if (!this._spine_3_7_99) {
if (!slot.bone.active) {
clipper.clipEndWithSlot(slot);
continue;
}
}
However, even if I comment out this code, the situation remains unchanged.
Tracing this code, I see 3 objects in this loop:

  1. Set mask
  2. Draw circle
  3. Draw square

But it should:

  1. Set mask
  2. draw the circle
  3. remove mask
  4. draw the square
    Please update the spine library and rebuild playcanvas-spine.4.1.js.

You can check:
https://playcanvas.com/editor/scene/2001633
https://www.youtube.com/shorts/BnI2MctLFNg
https://github.com/eugene1kolombet/public/blob/main/moving_mask_spine_test.zip
Thank You!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant