Stores a slot's current pose. Slots organize attachments for Skeleton.drawOrder
purposes and provide a place to store
state for an attachment. State cannot be stored in an attachment itself because attachments are stateless and may be shared
across multiple skeletons.
Constructor
Variables
color:Color
The color used to tint the slot's attachment. If darkColor
is set, this is used as the light color for two
color tinting.
darkColor:Null<Color>
The dark color used to tint the slot's attachment for two color tinting, or null if two color tinting is not used. The dark color's alpha is not used.
finaldeform:Array<Float> = new Array<Float>()
Values to deform the slot's attachment. For an unweighted mesh, the entries are local positions for each vertex. For a weighted mesh, the entries are an offset for each vertex which will be added to the mesh's local vertex positions.
See VertexAttachment.computeWorldVertices
and DeformTimeline
.
Methods
getAttachment():Null<Attachment>
The current attachment for the slot, or null if the slot has no attachment.
getAttachmentTime():Float
The time that has elapsed since the last time the attachment was set or cleared. Relies on `Skeleton.time.
setAttachment(attachment:Null<Attachment>):Void
Sets the slot's attachment and, if the attachment changed, resets attachmentTime
and clears deform
.