easing.*

Type Library
Revision Current Public Release (2014.2189)
Keywords easing, animation, transition, tween, interpolation
See also Transitions/Tweens
transition

Overview

Easing functions provide a simple way of interpolating between two values to achieve varied animations. They are used in conjunction with the transition library.

The 42 easing methods included with Corona SDK are based on Robert Penner's easing functions.

Syntax

transition.to( target, { transition=easing.outExpo } )
transition.from( target, { transition=easing.inOutCirc } )

Easing Functions

linear

This is the default interpolation and will be used unless another easing method isn't defined.

continuousLoop

This easing function will tween an object to its target state and then reverse back to the initial state (interpolation is linear).

Examples

local circle = display.newCircle( 100, 100, 40 )
circle:setFillColor( 0, 0, 1 )
transition.to( circle, { time=400, y=200, transition=easing.inExpo } )