Fork me on GitHub
View source

package haxepunk.tweens.motion

class QuadPath


extends Motion

A series of points which will determine a path from the beginning point to the end poing using quadratic curves.

Constructor

View source

new (type : TweenType) : Void

Variables

read only pointCount : Float

Amount of points on the path.

Functions

View source

addPoint (x : Float = 0, y : Float = 0) : Void

Adds the point to the path.


Parameters:
x   

X position.

y   

Y position.

View source

getPoint (index : Int = 0) : Vector2

Gets the point on the path.


Parameters:
index   

Index of the point.


Returns:

The Point object.

View source

setMotion (duration : Float, ease : EaseFunction) : Void

Starts moving along the path.


Parameters:
duration   

Duration of the movement.

ease   

Optional easer function.

View source

setMotionSpeed (speed : Float, ease : EaseFunction) : Void

Starts moving along the path at the speed.


Parameters:
speed   

Speed of the movement.

ease   

Optional easer function.