mirror of
https://github.com/3b1b/manim.git
synced 2025-07-28 04:23:16 +08:00
11 lines
263 B
Python
11 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
|