Skip to content

Commit

Permalink
[ts][pixi-v8] Ensure cached uvs array sized. Closes #2677.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidetan committed Nov 12, 2024
1 parent 5bd3f3a commit 6ddf908
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions spine-ts/spine-pixi-v8/src/Spine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,12 @@ export class Spine extends ViewContainer {
);
}

// sequences uvs are known only after computeWorldVertices is invoked
if (cacheData.uvs.length < attachment.uvs.length) {
cacheData.uvs = new Float32Array(attachment.uvs.length);
}

// need to copy because attachments uvs are shared among skeletons using the same atlas
fastCopy((attachment.uvs as Float32Array).buffer, cacheData.uvs.buffer);

const skeleton = slot.bone.skeleton;
Expand Down

0 comments on commit 6ddf908

Please sign in to comment.