Skip to content

Commit

Permalink
[ts][pixi-v8] Fix: pixi v8 bug in validate renderables (#2717)
Browse files Browse the repository at this point in the history
* Update SpinePipe.ts

* fix a little spine issue
  • Loading branch information
GoodBoyDigital authored Dec 18, 2024
1 parent 4fced40 commit 50e3b40
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion spine-ts/spine-pixi-v8/src/Spine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@ export class Spine extends ViewContainer {
}

private validateAttachments () {

const currentDrawOrder = this.skeleton.drawOrder;

const lastAttachments = this._lastAttachments;
Expand Down Expand Up @@ -404,7 +405,7 @@ export class Spine extends ViewContainer {
lastAttachments.length = index;
}

this.spineAttachmentsDirty = spineAttachmentsDirty;
this.spineAttachmentsDirty ||= spineAttachmentsDirty;
}

private updateAndSetPixiMask (slot: Slot, last: boolean) {
Expand Down
6 changes: 6 additions & 0 deletions spine-ts/spine-pixi-v8/src/SpinePipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit 50e3b40

Please sign in to comment.