[ts][pixi-v8] Fix: pixi v8 bug in validate renderables (#2717)

* Update SpinePipe.ts

* fix a little spine issue
This commit is contained in:
Mat Groves 2024-12-18 13:23:36 +00:00 committed by GitHub
parent 4fced40d61
commit 50e3b405b5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 1 deletions

View File

@ -377,6 +377,7 @@ export class Spine extends ViewContainer {
}
private validateAttachments () {
const currentDrawOrder = this.skeleton.drawOrder;
const lastAttachments = this._lastAttachments;
@ -404,7 +405,7 @@ export class Spine extends ViewContainer {
lastAttachments.length = index;
}
this.spineAttachmentsDirty = spineAttachmentsDirty;
this.spineAttachmentsDirty ||= spineAttachmentsDirty;
}
private updateAndSetPixiMask (slot: Slot, last: boolean) {

View File

@ -117,6 +117,9 @@ export class SpinePipe implements RenderPipe<Spine> {
spine._validateAndTransformAttachments();
spine.spineAttachmentsDirty = false;
spine.spineTexturesDirty = false;
for (let i = 0, n = drawOrder.length; i < n; i++) {
const slot = drawOrder[i];
const attachment = slot.getAttachment();
@ -154,6 +157,9 @@ export class SpinePipe implements RenderPipe<Spine> {
const gpuSpine = this.gpuSpineData[spine.uid];
spine._validateAndTransformAttachments();
spine.spineAttachmentsDirty = false;
spine.spineTexturesDirty = false;
const drawOrder = spine.skeleton.drawOrder;