Fork me on GitHub
View source

package com.haxepunk.tweens.motion

class QuadMotion


extends Motion

Determines motion along a quadratic curve.

Constructor

View source

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

Constructor.


Parameters:
complete   

Optional completion callback.

type   

Tween type.

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 : Float ->Float, ) : 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 : Float ->Float, ) : 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.