Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

Whoops, last commit seriously messed up camera

Grant Sanderson60eeb5f15197
diff --git a/hanoi.py b/hanoi.py
index 39a211b64..7087ffa74 100644
--- a/hanoi.py
+++ b/hanoi.py
@@ -1104,7 +1104,8 @@ class IntroduceBinaryCounting(BinaryCountingScene):
"$0 \\!\\cdot\\! 2 + $",
"$0$",
)
- for piece, color in zip(bubble.content.submobjects, self.power_colors):
+ colors = reversed(self.power_colors[:3])
+ for piece, color in zip(bubble.content.submobjects, colors):
piece[0].highlight(color)
self.increment(added_anims = [Transform(curr_content, bubble.content)])
four_brace = Brace(self.number_mob[-1])
diff --git a/scene/scene.py b/scene/scene.py
index f04697ad5..f03b7d784 100644
--- a/scene/scene.py
+++ b/scene/scene.py
@@ -58,6 +58,9 @@ class Scene(object):
def get_frame(self):
return self.camera.get_image()
+ def set_camera_image(self, pixel_array):
+ self.camera.set_image(pixel_array)
+
def set_camera_background(self, background):
self.camera.set_background(background)
@@ -73,7 +76,7 @@ class Scene(object):
if mobjects is None:
mobjects = self.mobjects
if background is not None:
- self.set_camera_background(background)
+ self.set_camera_image(background)
else:
self.reset_camera()
self.capture_mobjects_in_camera(mobjects, **kwargs)