mirror of
https://github.com/3b1b/manim.git
synced 2025-08-01 06:22:54 +08:00
Whoops, last commit seriously messed up camera
This commit is contained in:
3
hanoi.py
3
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])
|
||||
|
@ -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)
|
||||
|
Reference in New Issue
Block a user