From fa24ea24c1e4b764993f6e5bf6796d5fd7a0fe37 Mon Sep 17 00:00:00 2001 From: Davide Tantillo Date: Thu, 26 Jun 2025 11:15:39 +0200 Subject: [PATCH] [ts] Fix MeshAttachment copy changing uvs type. --- spine-ts/spine-core/src/attachments/MeshAttachment.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spine-ts/spine-core/src/attachments/MeshAttachment.ts b/spine-ts/spine-core/src/attachments/MeshAttachment.ts index d65647f9d..be75a1c89 100644 --- a/spine-ts/spine-core/src/attachments/MeshAttachment.ts +++ b/spine-ts/spine-core/src/attachments/MeshAttachment.ts @@ -178,7 +178,7 @@ export class MeshAttachment extends VertexAttachment implements HasTextureRegion this.copyTo(copy); copy.regionUVs = new Array(this.regionUVs.length); Utils.arrayCopy(this.regionUVs, 0, copy.regionUVs, 0, this.regionUVs.length); - copy.uvs = new Array(this.uvs.length); + copy.uvs = this.uvs instanceof Float32Array ? Utils.newFloatArray(this.uvs.length) : new Array(this.uvs.length); Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, this.uvs.length); copy.triangles = new Array(this.triangles.length); Utils.arrayCopy(this.triangles, 0, copy.triangles, 0, this.triangles.length);