UpdateFromFunc

Qualified name: manim.animation.updaters.update.UpdateFromFunc

class UpdateFromFunc(mobject=None, *args, use_override=True, **kwargs)[source]

Bases: Animation

update_function of the form func(mobject), presumably to be used when the state of one mobject is dependent on another simultaneously animated mobject

Methods

interpolate_mobject

Interpolates the mobject of the Animation based on alpha value.

Attributes

run_time

Parameters:
  • mobject (Mobject)

  • update_function (Callable[[Mobject], Any])

  • suspend_mobject_updating (bool)

  • kwargs (Any)

_original__init__(mobject, update_function, suspend_mobject_updating=False, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

Parameters:
  • mobject (Mobject)

  • update_function (Callable[[Mobject], Any])

  • suspend_mobject_updating (bool)

  • kwargs (Any)

Return type:

None

interpolate_mobject(alpha)[source]

Interpolates the mobject of the Animation based on alpha value.

Parameters:

alpha (float) – A float between 0 and 1 expressing the ratio to which the animation is completed. For example, alpha-values of 0, 0.5, and 1 correspond to the animation being completed 0%, 50%, and 100%, respectively.

Return type:

None