An attachment whose vertices make up a composite Bezier curve.

See {@link PathConstraint} and Paths in the Spine User Guide.

Constructor

new(name:String)

Variables

@:value(false)closed:Bool = false

@:value(false)constantSpeed:Bool = false

@:value(new Color(1, 0.5, 0, 1))color:Color = new Color(1, 0.5, 0, 1)

Methods

getClosed():Bool

If true, the start and end knots are connected.

getConstantSpeed():Bool

If true, additional calculations are performed to make computing positions along the path more accurate and movement along the path have a constant speed.

setConstantSpeed(constantSpeed:Bool):Void

getLengths():FloatArray

The lengths along the path in the setup pose from the start of the path to the end of each Bezier curve.

getColor():Color

The color of the path as it was in Spine, or a default color if nonessential data was not exported. Paths are not usually rendered at runtime.

Inherited Variables

Inherited Methods

Defined by VertexAttachment

computeWorldVertices(slot:Slot, start:Int, count:Int, worldVertices:FloatArray, offset:Int, stride:Int):Void

Transforms the attachment's local {@link #getVertices()} to world coordinates. If the slot's {@link Slot#getDeform()} is not empty, it is used to deform the vertices.

See World transforms in the Spine Runtimes Guide. @link #getVertices()} value to transform. Each vertex has 2 values, x and y. @link #getWorldVerticesLength()} - start.

Parameters:

start

The index of the first {

count

The number of world vertex values to output. Must be <= {

worldVertices

The output world vertices. Must have a length >= offset + count * stride / 2.

offset

The worldVertices index to begin writing values.

stride

The number of worldVertices entries between the value pairs written.

getDeformAttachment():VertexAttachment

Deform keys for the deform attachment are also applied to this attachment.

Returns:

May be null if no deform keys should be applied.

setDeformAttachment(deformAttachment:VertexAttachment):Void

Parameters:

deformAttachment

May be null if no deform keys should be applied.

getBones():IntArray

The bones which affect the {@link #getVertices()}. The array entries are, for each vertex, the number of bones affecting the vertex followed by that many bone indices, which is the index of the bone in {@link Skeleton#getBones()}. Will be null if this attachment has no weights.

setBones(bones:IntArray):Void

Parameters:

bones

May be null if this attachment has no weights.

getVertices():FloatArray

The vertex positions in the bone's coordinate system. For a non-weighted attachment, the values are x,y entries for each vertex. For a weighted attachment, the values are x,y,weight entries for each bone affecting each vertex.

getWorldVerticesLength():Int

The maximum number of world vertex values that can be output by {@link #computeWorldVertices(Slot, int, int, float[], int, int)} using the count parameter.

setWorldVerticesLength(worldVerticesLength:Int):Void

getId():Int

Returns a unique ID for this attachment.

copyTo(attachment:VertexAttachment):Void

Does not copy id (generated) or name (set on construction).

Defined by Attachment

getName():String

The attachment's name.