Package libavg :: Module anim :: Class ContinuousAnim

Class ContinuousAnim

source code


Class that animates an attribute of a libavg node continuously and linearly. The animation will not stop until the abort() method is called. A possible use case is the continuous rotation of an object.

Instance Methods
 
__init__(self, node, attrName, startValue, speed, useInt=False, onStart=None) source code
    Inherited from SimpleAnim
 
abort(self)
Stops the animation.
source code
 
isDone(self)
Returns True if the animation has run its course.
source code
 
setHandler(self, onStop, onAbort) source code
 
start(self, keepAttr=False) source code
Method Details

__init__(self, node, attrName, startValue, speed, useInt=False, onStart=None)
(Constructor)

source code 
Parameters:
  • node - The libavg node object to animate.
  • attrName - The name of the attribute to change. Must be a numeric attribute.
  • startValue - Initial value of the attribute.
  • speed - Animation speed, value to be added per second.
  • useInt - If True, the attribute is always set to an integer value.
Overrides: SimpleAnim.__init__