Skip to content
This repository has been archived by the owner on Nov 20, 2024. It is now read-only.

fix: clipping termination on same slot, always set dirty when vertex … #34

Merged
merged 1 commit into from
Aug 22, 2024

Conversation

davidetan
Copy link
Contributor

This PR fixes two issues with clipping.

The first is reported here: #33 (comment)
Clipping is not correctly terminated when the clipper is clipping. The logic is now changed so that clip termination is always attempted unless the attachment is a ClippingAttachment.

The second fix changes the condition on which updateClippingData set the Spine object as dirty. Currently, it sets is as dirty if sizeChange && !cacheData.skipRender, that means if vertices/indexes changed size and verticesCount > 0.

However, when transitioning from a positive number of vertices to 0 vertices, if we don't set the Spine object as dirty, updateRenderable is called and the respective BatchableSpineSlot data is not updated. This means that the latest vertices are rendered for a slot that should have 0 vertices.

For both cases, we can find a repro here: export.zip

For the second issue, the white square should completely disappear at the end of the jump. Currently, it remains stuck in the middle of the jump.

…count change (see pixijs#33).

If not set dirty when vertex count changes, the latest vertices would be shown.
Copy link
Member

@GoodBoyDigital GoodBoyDigital left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

@Zyie Zyie merged commit 8708c9b into pixijs:main Aug 22, 2024
1 check passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants