mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Updated copy method of PiCreature clas
This commit is contained in:
parent
934b4e6935
commit
4d4c72bcb8
1 changed files with 4 additions and 2 deletions
|
@ -62,8 +62,6 @@ class PiCreature(SVGMobject):
|
|||
self.submobjects[LEFT_EYE_INDEX],
|
||||
self.submobjects[RIGHT_EYE_INDEX]
|
||||
])
|
||||
self.submobjects = []
|
||||
self.add(self.body, self.mouth, self.eyes, self.pupils)
|
||||
self.parts_named = True
|
||||
|
||||
def init_colors(self):
|
||||
|
@ -76,6 +74,10 @@ class PiCreature(SVGMobject):
|
|||
self.eyes.set_fill(WHITE, opacity = 1)
|
||||
return self
|
||||
|
||||
def copy(self):
|
||||
copy_mobject = SVGMobject.copy(self)
|
||||
copy_mobject.name_parts()
|
||||
return copy_mobject
|
||||
|
||||
def highlight(self, color):
|
||||
self.body.set_fill(color)
|
||||
|
|
Loading…
Add table
Reference in a new issue