Fork me on GitHub
View source

package haxepunk.tweens.motion

class CircularMotion


extends Motion

Determines a circular motion.

Constructor

View source

new (type : TweenType) : Void

Variables

read only angle : Float

The current position on the circle.

read only circumference : Float

The circumference of the current circle motion.

Functions

View source

setMotion (centerX : Float, centerY : Float, radius : Float, angle : Float, clockwise : Bool, duration : Float, ease : EaseFunction) : Void

Starts moving along a circle.


Parameters:
centerX   

X position of the circle's center.

centerY   

Y position of the circle's center.

radius   

Radius of the circle.

angle   

Starting position on the circle.

clockwise   

If the motion is clockwise.

duration   

Duration of the movement.

ease   

Optional easer function.

View source

setMotionSpeed (centerX : Float, centerY : Float, radius : Float, angle : Float, clockwise : Bool, speed : Float, ease : EaseFunction) : Void

Starts moving along a circle at the speed.


Parameters:
centerX   

X position of the circle's center.

centerY   

Y position of the circle's center.

radius   

Radius of the circle.

angle   

Starting position on the circle.

clockwise   

If the motion is clockwise.

speed   

Speed of the movement.

ease   

Optional easer function.