Package libavg :: Module anim :: Class SplineAnim

Class SplineAnim

source code


Class that animates an attribute of a libavg node by interpolating between start and end values using a cubic spline.

Instance Methods
 
__init__(self, node, attrName, duration, startValue, startSpeed, endValue, endSpeed, useInt, onStop) source code
Method Details

__init__(self, node, attrName, duration, startValue, startSpeed, endValue, endSpeed, useInt, onStop)
(Constructor)

source code 
Parameters:
  • node - The libavg node object to animate.
  • attrName - The name of the attribute to change. Must be a numeric attribute.
  • duration - The length of the animation in milliseconds.
  • startValue - Initial value of the attribute.
  • startSpeed - Initial speed of the animation.
  • endValue - Value of the attribute after duration has elapsed.
  • endSpeed - Final speed of the animation.
  • useInt - If True, the attribute is always set to an integer value.
  • onStop - Python callable to invoke when duration has elapsed and the animation has finished. This can be used to chain animations together by using lambda to create a second animation.
Overrides: SimpleAnim.__init__