ALKMaps.Tween

Summary
ALKMaps.Tween
Properties
easing{<ALKMaps.Easing>(Function)} Easing equation used for the animation Defaultly set to ALKMaps.Easing.Expo.easeOut
begin{Object} Values to start the animation with
finish{Object} Values to finish the animation with
duration{int} duration of the tween (number of steps)
callbacks{Object} An object with start, eachStep and done properties whose values are functions to be call during the animation.
time{int} Step counter
animationId{int} Loop id returned by ALKMaps.Animation.start
playing{Boolean} Tells if the easing is currently playing
Constructor
ALKMaps.TweenCreates a Tween.
Functions
startPlays the Tween, and calls the callback method on each step
stopStops the Tween, and calls the done callback Doesn’t do anything if animation is already finished
playCalls the appropriate easing method
ALKMaps.EasingEasing Equations by Robert Penner, http://www.robertpenner.com/easing/
ALKMaps.Easing.Linear
Functions
easeIn
easeOut
easeInOut
ALKMaps.Easing.Expo
Functions
easeIn
easeOut
easeInOut
ALKMaps.Easing.Quad
Functions
easeIn
easeOut
easeInOut

Properties

easing

{<ALKMaps.Easing>(Function)} Easing equation used for the animation Defaultly set to ALKMaps.Easing.Expo.easeOut

begin

{Object} Values to start the animation with

finish

{Object} Values to finish the animation with

duration

{int} duration of the tween (number of steps)

callbacks

{Object} An object with start, eachStep and done properties whose values are functions to be call during the animation.  They are passed the current computed value as argument.

time

{int} Step counter

animationId

{int} Loop id returned by ALKMaps.Animation.start

playing

{Boolean} Tells if the easing is currently playing

Constructor

ALKMaps.Tween

Creates a Tween.

Parameters

easing{<ALKMaps.Easing>(Function)} easing function method to use

Functions

start

start: function(begin,
finish,
duration,
options)

Plays the Tween, and calls the callback method on each step

Parameters

begin{Object} values to start the animation with
finish{Object} values to finish the animation with
duration{int} duration of the tween (number of steps)
options{Object} hash of options (for example callbacks (start, eachStep, done))

stop

stop: function()

Stops the Tween, and calls the done callback Doesn’t do anything if animation is already finished

play

play: function()

Calls the appropriate easing method

ALKMaps.Easing

Credits

Easing Equations by Robert Penner, http://www.robertpenner.com/easing/

ALKMaps.Easing.Linear

Functions

easeIn

easeIn: function(t,
b,
c,
d)

Parameters

t{Float} time
b{Float} beginning position
c{Float} total change
d{Float} duration of the transition

Returns

{Float}

easeOut

easeOut: function(t,
b,
c,
d)

Parameters

t{Float} time
b{Float} beginning position
c{Float} total change
d{Float} duration of the transition

Returns

{Float}

easeInOut

easeInOut: function(t,
b,
c,
d)

Parameters

t{Float} time
b{Float} beginning position
c{Float} total change
d{Float} duration of the transition

Returns

{Float}

ALKMaps.Easing.Expo

Functions

easeIn

easeIn: function(t,
b,
c,
d)

Parameters

t{Float} time
b{Float} beginning position
c{Float} total change
d{Float} duration of the transition

Returns

{Float}

easeOut

easeOut: function(t,
b,
c,
d)

Parameters

t{Float} time
b{Float} beginning position
c{Float} total change
d{Float} duration of the transition

Returns

{Float}

easeInOut

easeInOut: function(t,
b,
c,
d)

Parameters

t{Float} time
b{Float} beginning position
c{Float} total change
d{Float} duration of the transition

Returns

{Float}

ALKMaps.Easing.Quad

Functions

easeIn

easeIn: function(t,
b,
c,
d)

Parameters

t{Float} time
b{Float} beginning position
c{Float} total change
d{Float} duration of the transition

Returns

{Float}

easeOut

easeOut: function(t,
b,
c,
d)

Parameters

t{Float} time
b{Float} beginning position
c{Float} total change
d{Float} duration of the transition

Returns

{Float}

easeInOut

easeInOut: function(t,
b,
c,
d)

Parameters

t{Float} time
b{Float} beginning position
c{Float} total change
d{Float} duration of the transition

Returns

{Float}

start: function(begin,
finish,
duration,
options)
Plays the Tween, and calls the callback method on each step
stop: function()
Stops the Tween, and calls the done callback Doesn’t do anything if animation is already finished
play: function()
Calls the appropriate easing method
easeIn: function(t,
b,
c,
d)
easeOut: function(t,
b,
c,
d)
easeInOut: function(t,
b,
c,
d)
easeIn: function(t,
b,
c,
d)
easeOut: function(t,
b,
c,
d)
easeInOut: function(t,
b,
c,
d)
easeIn: function(t,
b,
c,
d)
easeOut: function(t,
b,
c,
d)
easeInOut: function(t,
b,
c,
d)
Close