PathConstraint

spine.PathConstraint (Class)
Implements: Updatable

Stores the current pose for a path constraint. A path constraint adjusts the rotation, translation, and scale of the constrained bones so they follow a {@link PathAttachment}.

See Path constraints in the Spine User Guide.

Instance Members



spine
target: Slot

spine
position: Float

spine
spacing: Float

spine
mixRotate: Float

spine
mixX: Float

spine
mixY: Float

spine
active: Bool

spine
update(): Void

Applies the constraint to the constrained bones.


spine
computeWorldPositions(path: spine.attachments.PathAttachment, spacesCount: Int, tangents: Bool): spine.support.utils.FloatArray
Name Type
path spine.attachments.PathAttachment
spacesCount Int
tangents Bool
Returns
spine.support.utils.FloatArray

spine
getPosition(): Float

The position along the path.

Returns
Float

spine
setPosition(position: Float): Void
Name Type
position Float

spine
getSpacing(): Float

The spacing between bones.

Returns
Float

spine
setSpacing(spacing: Float): Void
Name Type
spacing Float

spine
getMixRotate(): Float

A percentage (0-1) that controls the mix between the constrained and unconstrained rotation.

Returns
Float

spine
setMixRotate(mixRotate: Float): Void
Name Type
mixRotate Float

spine
getMixX(): Float

A percentage (0-1) that controls the mix between the constrained and unconstrained translation X.

Returns
Float

spine
setMixX(mixX: Float): Void
Name Type
mixX Float

spine
getMixY(): Float

A percentage (0-1) that controls the mix between the constrained and unconstrained translation Y.

Returns
Float

spine
setMixY(mixY: Float): Void
Name Type
mixY Float

The bones that will be modified by this path constraint.

Returns
spine.support.utils.Array<Bone>

spine
getTarget(): Slot

The slot whose path attachment will be used to constrained the bones.

Returns
Slot

spine
setTarget(target: Slot): Void
Name Type
target Slot

spine
isActive(): Bool
Returns
Bool

spine
getData(): PathConstraintData

The path constraint's setup pose data.

Returns
PathConstraintData

spine
toString(): String
Returns
String

spine
new(data: PathConstraintData, skeleton: Skeleton): Void
Name Type
data PathConstraintData
skeleton Skeleton

Private Members

spine
NONE: Int

spine
BEFORE: Int

spine
AFTER: Int

spine
epsilon: Float







spine
addBeforePosition(p: Float, temp: spine.support.utils.FloatArray, i: Int, out: spine.support.utils.FloatArray, o: Int): Void
Name Type
p Float
temp spine.support.utils.FloatArray
i Int
out spine.support.utils.FloatArray
o Int

spine
addAfterPosition(p: Float, temp: spine.support.utils.FloatArray, i: Int, out: spine.support.utils.FloatArray, o: Int): Void
Name Type
p Float
temp spine.support.utils.FloatArray
i Int
out spine.support.utils.FloatArray
o Int

spine
addCurvePosition(p: Float, x1: Float, y1: Float, cx1: Float, cy1: Float, cx2: Float, cy2: Float, x2: Float, y2: Float, out: spine.support.utils.FloatArray, o: Int, tangents: Bool): Void
Name Type
p Float
x1 Float
y1 Float
cx1 Float
cy1 Float
cx2 Float
cy2 Float
x2 Float
y2 Float
out spine.support.utils.FloatArray
o Int
tangents Bool