Skip to content

Commit

Permalink
ClippingAttachment
Browse files Browse the repository at this point in the history
  • Loading branch information
flyover committed Jun 15, 2019
1 parent 7c46b2a commit ed3f046
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 31 deletions.
22 changes: 9 additions & 13 deletions demo/dist/spine.js

Large diffs are not rendered by default.

30 changes: 12 additions & 18 deletions spine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1453,36 +1453,30 @@ export interface PathAttachmentJSON extends AttachmentJSON {
}

export class ClippingAttachment extends Attachment {
// public color: Color = new Color();
// public closed: boolean = false;
// public accurate: boolean = true;
// public lengths: number[] = [];
// public vertex_count: number = 0;
// public vertices: number[] = [];
public color: Color = new Color();
public end: string = "";
public vertex_count: number = 0;
public vertices: number[] = [];

constructor() {
super("clipping");
}

public load(json: ClippingAttachmentJSON): this {
super.load(json);
// this.color.load(json.color, 0xff7f00ff);
// this.closed = loadBool(json, "closed", false);
// this.accurate = loadBool(json, "constantSpeed", true);
// this.lengths = json.lengths || [];
// this.vertex_count = loadInt(json, "vertexCount", 0);
// this.vertices = json.vertices || [];
this.color.load(json.color, 0xff7f00ff);
this.end = loadString(json, "end", "");
this.vertex_count = loadInt(json, "vertexCount", 0);
this.vertices = json.vertices || [];
return this;
}
}

export interface ClippingAttachmentJSON extends AttachmentJSON {
// color?: ColorJSON;
// closed?: boolean;
// constantSpeed?: boolean;
// lengths: number[];
// vertexCount: number;
// vertices: number[];
color?: ColorJSON;
end: string;
vertexCount: number;
vertices: number[];
}

export class SkinSlot {
Expand Down

0 comments on commit ed3f046

Please sign in to comment.