From c24f7b6926f0e3156009bfa34b60c3888271ee52 Mon Sep 17 00:00:00 2001 From: Ben Hambrecht Date: Mon, 9 Apr 2018 19:27:13 +0200 Subject: [PATCH] fixed pi creature color bug --- for_3b1b_videos/pi_creature.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/for_3b1b_videos/pi_creature.py b/for_3b1b_videos/pi_creature.py index b80a0e2a..95f82973 100644 --- a/for_3b1b_videos/pi_creature.py +++ b/for_3b1b_videos/pi_creature.py @@ -98,14 +98,15 @@ class PiCreature(SVGMobject): def set_color(self, color): self.body.set_fill(color) + self.color = color return self def change_mode(self, mode): new_self = self.__class__( - mode=mode, - color=self.color + mode = mode, ) - new_self.scale_to_fit_height(self.get_height()) + new_self.match_style(self) + new_self.match_height(self) if self.is_flipped() ^ new_self.is_flipped(): new_self.flip() new_self.shift(self.eyes.get_center() - new_self.eyes.get_center())