[ts][pixi-v8] Ensure cached uvs array sized. Closes #2677.

This commit is contained in:
Davide Tantillo 2024-11-12 09:59:01 +01:00
parent 5bd3f3aeb9
commit 6ddf908899

View File

@ -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;