mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Whoops, last commit seriously messed up camera
This commit is contained in:
parent
951a681997
commit
60eeb5f151
2 changed files with 6 additions and 2 deletions
3
hanoi.py
3
hanoi.py
|
@ -1104,7 +1104,8 @@ class IntroduceBinaryCounting(BinaryCountingScene):
|
||||||
"$0 \\!\\cdot\\! 2 + $",
|
"$0 \\!\\cdot\\! 2 + $",
|
||||||
"$0$",
|
"$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)
|
piece[0].highlight(color)
|
||||||
self.increment(added_anims = [Transform(curr_content, bubble.content)])
|
self.increment(added_anims = [Transform(curr_content, bubble.content)])
|
||||||
four_brace = Brace(self.number_mob[-1])
|
four_brace = Brace(self.number_mob[-1])
|
||||||
|
|
|
@ -58,6 +58,9 @@ class Scene(object):
|
||||||
def get_frame(self):
|
def get_frame(self):
|
||||||
return self.camera.get_image()
|
return self.camera.get_image()
|
||||||
|
|
||||||
|
def set_camera_image(self, pixel_array):
|
||||||
|
self.camera.set_image(pixel_array)
|
||||||
|
|
||||||
def set_camera_background(self, background):
|
def set_camera_background(self, background):
|
||||||
self.camera.set_background(background)
|
self.camera.set_background(background)
|
||||||
|
|
||||||
|
@ -73,7 +76,7 @@ class Scene(object):
|
||||||
if mobjects is None:
|
if mobjects is None:
|
||||||
mobjects = self.mobjects
|
mobjects = self.mobjects
|
||||||
if background is not None:
|
if background is not None:
|
||||||
self.set_camera_background(background)
|
self.set_camera_image(background)
|
||||||
else:
|
else:
|
||||||
self.reset_camera()
|
self.reset_camera()
|
||||||
self.capture_mobjects_in_camera(mobjects, **kwargs)
|
self.capture_mobjects_in_camera(mobjects, **kwargs)
|
||||||
|
|
Loading…
Add table
Reference in a new issue