Fork me on GitHub
View source

package haxepunk.tweens.motion

class CubicMotion


extends Motion

Determines motion along a cubic curve.

Constructor

View source

new (type : TweenType) : Void

Functions

View source

setMotion (fromX : Float, fromY : Float, aX : Float, aY : Float, bX : Float, bY : Float, toX : Float, toY : Float, duration : Float, ease : EaseFunction) : Void

Starts moving along the curve.


Parameters:
fromX   

X start.

fromY   

Y start.

aX   

First control x.

aY   

First control y.

bX   

Second control x.

bY   

Second control y.

toX   

X finish.

toY   

Y finish.

duration   

Duration of the movement.

ease   

Optional easer function.