From 60eeb5f1519771aa1ecad7b75d62dab1f70c321b Mon Sep 17 00:00:00 2001 From: Grant Sanderson Date: Thu, 24 Nov 2016 10:38:52 -0800 Subject: [PATCH] Whoops, last commit seriously messed up camera --- hanoi.py | 3 ++- scene/scene.py | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/hanoi.py b/hanoi.py index 39a211b6..7087ffa7 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 f04697ad..f03b7d78 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)