mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-06 18:56:54 +08:00
[ts] Fix MeshAttachment copy changing uvs type.
This commit is contained in:
parent
b8211baedc
commit
fa24ea24c1
@ -178,7 +178,7 @@ export class MeshAttachment extends VertexAttachment implements HasTextureRegion
|
|||||||
this.copyTo(copy);
|
this.copyTo(copy);
|
||||||
copy.regionUVs = new Array<number>(this.regionUVs.length);
|
copy.regionUVs = new Array<number>(this.regionUVs.length);
|
||||||
Utils.arrayCopy(this.regionUVs, 0, copy.regionUVs, 0, this.regionUVs.length);
|
Utils.arrayCopy(this.regionUVs, 0, copy.regionUVs, 0, this.regionUVs.length);
|
||||||
copy.uvs = new Array<number>(this.uvs.length);
|
copy.uvs = this.uvs instanceof Float32Array ? Utils.newFloatArray(this.uvs.length) : new Array<number>(this.uvs.length);
|
||||||
Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, this.uvs.length);
|
Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, this.uvs.length);
|
||||||
copy.triangles = new Array<number>(this.triangles.length);
|
copy.triangles = new Array<number>(this.triangles.length);
|
||||||
Utils.arrayCopy(this.triangles, 0, copy.triangles, 0, this.triangles.length);
|
Utils.arrayCopy(this.triangles, 0, copy.triangles, 0, this.triangles.length);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user