mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
fixed pi creature color bug
This commit is contained in:
parent
15d582e673
commit
c24f7b6926
1 changed files with 4 additions and 3 deletions
|
@ -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())
|
||||
|
|
Loading…
Add table
Reference in a new issue