[ts] Fix copy constructor of region and mesh attachments

This commit is contained in:
Mario Zechner 2021-11-04 17:16:33 +01:00
parent c7b54dc9b3
commit 2af8636407
2 changed files with 2 additions and 2 deletions

View File

@ -181,7 +181,7 @@ export class MeshAttachment extends VertexAttachment implements HasTextureRegion
Utils.arrayCopy(this.triangles, 0, copy.triangles, 0, this.triangles.length); Utils.arrayCopy(this.triangles, 0, copy.triangles, 0, this.triangles.length);
copy.hullLength = this.hullLength; copy.hullLength = this.hullLength;
copy.sequence = this.sequence.copy(); copy.sequence = this.sequence != null ? this.sequence.copy() : null;
// Nonessential. // Nonessential.
if (this.edges) { if (this.edges) {

View File

@ -193,7 +193,7 @@ export class RegionAttachment extends Attachment implements HasTextureRegion {
Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, 8); Utils.arrayCopy(this.uvs, 0, copy.uvs, 0, 8);
Utils.arrayCopy(this.offset, 0, copy.offset, 0, 8); Utils.arrayCopy(this.offset, 0, copy.offset, 0, 8);
copy.color.setFromColor(this.color); copy.color.setFromColor(this.color);
copy.sequence = this.sequence.copy(); copy.sequence = this.sequence != null ? this.sequence.copy() : null;
return copy; return copy;
} }