Fork me on GitHub
View source

package com.haxepunk.tweens.motion

class CubicMotion


extends Motion

Determines motion along a cubic curve.

Constructor

View source

new (complete : Dynamic ->Void, , type : TweenType) : Void

Constructor.


Parameters:
complete   

Optional completion callback.

type   

Tween type.

Functions

View source

setMotion (fromX : Float, fromY : Float, aX : Float, aY : Float, bX : Float, bY : Float, toX : Float, toY : Float, duration : Float, ?ease : Float ->Float, ) : 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.