Skin

spine.Skin (Class)

Stores attachments by slot index and attachment name.

See SkeletonData {@link SkeletonData#defaultSkin}, Skeleton {@link Skeleton#skin}, and Runtime skins in the Spine Runtimes Guide.

Instance Members

spine
name: String




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

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

Name Type
slotIndex Int
name String
attachment spine.attachments.Attachment

spine
addSkin(skin: Skin): Void

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

Name Type
skin Skin

spine
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.

Name Type
skin Skin

spine
getAttachment(slotIndex: Int, name: String): spine.attachments.Attachment

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

Name Type
slotIndex Int
name String
Returns
spine.attachments.Attachment

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

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

Name Type
slotIndex Int
name String

spine
getAttachments(): spine.support.utils.Array<SkinEntry>

Returns all attachments in this skin.

Returns
spine.support.utils.Array<SkinEntry>

spine
getAttachmentsInSkinForSlot(slotIndex: Int, attachments: spine.support.utils.Array<SkinEntry>): Void

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

Name Type
slotIndex Int
attachments spine.support.utils.Array<SkinEntry>

spine
clear(): Void

Clears all attachments, bones, and constraints.


Returns
spine.support.utils.Array<BoneData>

Returns
spine.support.utils.Array<ConstraintData>

spine
getName(): String

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

Returns
String

spine
toString(): String
Returns
String

spine
attachAll(skeleton: Skeleton, oldSkin: Skin): Void

Attach each attachment in this skin if the corresponding attachment in the old skin is currently attached.

Name Type
skeleton Skeleton
oldSkin Skin

spine
new(name: String): Void
Name Type
name String

Private Members

spine
lookup: SkinEntry