Stores attachments by slot index and attachment name.

See SkeletonData.defaultSkin, Skeleton.skin, and Runtime skins in the Spine Runtimes Guide.

Constructor

new(name:String)

Variables

@:value(new Array<Map<String,Attachment>>())attachments:Array<Map<String, Attachment>> = new Array<Map<String,Attachment>>()

@:value(new Array<BoneData>())bones:Array<BoneData> = new Array<BoneData>()

@:value(new Array<ConstraintData>())constraints:Array<ConstraintData> = new Array<ConstraintData>()

name:String

The skin's name, which is unique across all skins in the skeleton.

Methods

addSkin(skin:Skin):Void

Adds all attachments, bones, and constraints from the specified skin to this skin.

clear():Void

Clears all attachments, bones, and constraints.

copySkin(skin:Skin):Void

Adds all bones and constraints and copies of all attachments from the specified skin to this skin. Mesh attachments are not copied, instead a new linked mesh is created. The attachment copies can be modified without affecting the originals.

getAttachment(slotIndex:Int, name:String):Attachment

Returns the attachment for the specified slot index and name, or null.

getAttachments():Array<SkinEntry>

Returns all attachments in this skin.

getAttachmentsForSlot(slotIndex:Int, attachments:Array<SkinEntry>):Void

Returns all attachments in this skin for the specified slot index.

removeAttachment(slotIndex:Int, name:String):Void

Removes the attachment in the skin for the specified slot index and name, if any.

setAttachment(slotIndex:Int, name:String, attachment:Attachment):Void

Adds an attachment to the skin for the specified slot index and name.