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.

Static variables

@:value(-3)staticinlineread onlyAFTER:Int = -3

@:value(-2)staticinlineread onlyBEFORE:Int = -2

@:value(-1)staticinlineread onlyNONE:Int = -1

@:value(0.00001)staticinlineread onlyepsilon:Float = 0.00001

Constructor

Variables

@:value(false)active:Bool = false

bones:Array<Bone>

The bones that will be modified by this path constraint.

@:value(new Array<Float>())curves:Array<Float> = new Array<Float>()

data:PathConstraintData

The path constraint's setup pose data.

@:value(new Array<Float>())lengths:Array<Float> = new Array<Float>()

@:value(0.0)position:Float = 0.0

The position along the path.

@:value(new Array<Float>())positions:Array<Float> = new Array<Float>()

@:value(0.0)rotateMix:Float = 0.0

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

@:value(new Array<Float>())segments:Array<Float> = new Array<Float>()

@:value(new Array<Float>())spaces:Array<Float> = new Array<Float>()

@:value(0.0)spacing:Float = 0.0

The spacing between bones.

target:Slot

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

@:value(0.0)translateMix:Float = 0.0

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

@:value(new Array<Float>())world:Array<Float> = new Array<Float>()

Methods

addAfterPosition(p:Float, temp:Array<Float>, i:Int, out:Array<Float>, o:Int):Void

addBeforePosition(p:Float, temp:Array<Float>, i:Int, out:Array<Float>, o:Int):Void

addCurvePosition(p:Float, x1:Float, y1:Float, cx1:Float, cy1:Float, cx2:Float, cy2:Float, x2:Float, y2:Float, out:Array<Float>, o:Int, tangents:Bool):Void

apply():Void

Applies the constraint to the constrained bones.

computeWorldPositions(path:PathAttachment, spacesCount:Int, tangents:Bool, percentPosition:Bool, percentSpacing:Bool):Array<Float>

isActive():Bool

update():Void