Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

Moved updating_mobject_from_func

Grant Sanderson73af2b49717a
diff --git a/active_projects/quaternions.py b/active_projects/quaternions.py
index 8447337dc..43f6fe226 100644
--- a/active_projects/quaternions.py
+++ b/active_projects/quaternions.py
@@ -97,12 +97,6 @@ def stereo_project(mobject, axis=0, r=1, outer_r=10, **kwargs):
return mobject
-def updating_mobject_from_func(func):
- mob = func()
- mob.add_updater(lambda m: mob.become(func()))
- return mob
-
-
class Linus(VGroup):
CONFIG = {
"body_config": {
diff --git a/mobject/updater.py b/mobject/updater.py
new file mode 100644
index 000000000..e3e4e7b3c
--- /dev/null
+++ b/mobject/updater.py
@@ -0,0 +1,4 @@
+def updating_mobject_from_func(func):
+ mob = func()
+ mob.add_updater(lambda m: mob.become(func()))
+ return mob