The constructor function is called whenever a new instance of the animation is requested. The name of the function is not critical, but it is used in the registerAnimation call.
The updateCurrentTime function drives the actual animation: it is called whenever an animation frame is to be processed. The current time of the animation is passed in to it as the first parameter.
To let Plasma know that the animation exists, the registerAnimation function must be called from the script's global scope. registerAnimation takes two parameters: the name by which the animation will be identified and the constructor function.
A simple example of a zoom animation: