OpenLayers.Tween

Summary
OpenLayers.Tween
Properties
easing{<OpenLayers.Easing>(Function)} Easing equation used for the animation Defaultly set to OpenLayers.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.
minFrameRate{Number} The minimum framerate for animations in frames per second.
Constructor
OpenLayers.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
OpenLayers.EasingEasing Equations by Robert Penner, http://www.robertpenner.com/easing/
OpenLayers.Easing.Linear
OpenLayers.Easing.Expo
OpenLayers.Easing.Quad

Properties

easing

{<OpenLayers.Easing>(Function)} Easing equation used for the animation Defaultly set to OpenLayers.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.

minFrameRate

{Number} The minimum framerate for animations in frames per second.  After each step, the time spent in the animation is compared to the calculated time at this frame rate.  If the animation runs longer than the calculated time, the next step is skipped.  Default is 30.

Constructor

OpenLayers.Tween

Creates a Tween.

Parameters

easing{<OpenLayers.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 (callbacks (start, eachStep, done), minFrameRate)

stop

stop: function()

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

OpenLayers.Easing

Credits

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

OpenLayers.Easing.Linear

OpenLayers.Easing.Expo

OpenLayers.Easing.Quad

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
Close