Fork me on GitHub
View source

package haxepunk.tweens.motion

class QuadMotion


extends Motion

Determines motion along a quadratic curve.

Constructor

View source

new (type : TweenType) : Void

Variables

read only distance : Float

The distance of the entire curve.

Functions

View source

setMotion (fromX : Float, fromY : Float, controlX : Float, controlY : Float, toX : Float, toY : Float, duration : Float, ease : EaseFunction) : Void

Starts moving along the curve.


Parameters:
fromX   

X start.

fromY   

Y start.

controlX   

X control, used to determine the curve.

controlY   

Y control, used to determine the curve.

toX   

X finish.

toY   

Y finish.

duration   

Duration of the movement.

ease   

Optional easer function.

View source

setMotionSpeed (fromX : Float, fromY : Float, controlX : Float, controlY : Float, toX : Float, toY : Float, speed : Float, ease : EaseFunction) : Void

Starts moving along the curve at the speed.


Parameters:
fromX   

X start.

fromY   

Y start.

controlX   

X control, used to determine the curve.

controlY   

Y control, used to determine the curve.

toX   

X finish.

toY   

Y finish.

speed   

Speed of the movement.

ease   

Optional easer function.