mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
10 lines
263 B
Python
10 lines
263 B
Python
def always(method, *args, **kwargs):
|
|
mobject = method.__self__
|
|
func = method.__func__
|
|
mobject.add_updater(lambda m: func(m, *args, **kwargs))
|
|
|
|
|
|
def always_redraw(func):
|
|
mob = func()
|
|
mob.add_updater(lambda m: mob.become(func()))
|
|
return mob
|