mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 14:24:53 +08:00
[ts] Fix copy constructor of region and mesh attachments
This commit is contained in:
parent
c7b54dc9b3
commit
2af8636407
@ -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) {
|
||||||
|
|||||||
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user