Fork me on GitHub
View source

package com.haxepunk.tweens.motion

class CircularMotion


extends Motion

Determines a circular motion.

Constructor

View source

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

Constructor.


Parameters:
complete   

Optional completion callback.

type   

Tween type.

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