Documentation Index | From module rabbyt.anims.

AnimPyFunc

Inherits from: Anim

AnimPyFunc(function, cache=False)

An anim that calls a python function, using the returned value.

function is the callback called to retrieve the value. It should return a float.

If cache is True, the result returned by function will be cached for as long as the time (as set by rabbyt.set_time()) doesn't change. This could provide good speedup if the value is read multiple times per frame.