mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Reworked default π creature's kwargs
This commit is contained in:
parent
9f46c69fff
commit
a04a8635a7
1 changed files with 7 additions and 3 deletions
|
@ -388,9 +388,13 @@ class PiCreatureScene(Scene):
|
||||||
"total_wait_time" : 0,
|
"total_wait_time" : 0,
|
||||||
"seconds_to_blink" : 3,
|
"seconds_to_blink" : 3,
|
||||||
"pi_creatures_start_on_screen" : True,
|
"pi_creatures_start_on_screen" : True,
|
||||||
|
"default_pi_creature_kwargs" : {},
|
||||||
|
"default_pi_creature_class" : Mortimer,
|
||||||
}
|
}
|
||||||
def setup(self):
|
def setup(self):
|
||||||
self.pi_creatures = VGroup(*self.create_pi_creatures())
|
self.pi_creatures = VGroup(
|
||||||
|
*self.create_pi_creatures(**self.default_pi_creature_kwargs)
|
||||||
|
)
|
||||||
self.pi_creature = self.get_primary_pi_creature()
|
self.pi_creature = self.get_primary_pi_creature()
|
||||||
if self.pi_creatures_start_on_screen:
|
if self.pi_creatures_start_on_screen:
|
||||||
self.add(*self.pi_creatures)
|
self.add(*self.pi_creatures)
|
||||||
|
@ -399,10 +403,10 @@ class PiCreatureScene(Scene):
|
||||||
"""
|
"""
|
||||||
Likely updated for subclasses
|
Likely updated for subclasses
|
||||||
"""
|
"""
|
||||||
return VGroup(self.create_pi_creature())
|
return VGroup(self.create_pi_creature(**self.default_pi_creature_kwargs))
|
||||||
|
|
||||||
def create_pi_creature(self):
|
def create_pi_creature(self):
|
||||||
return Mortimer().to_corner(DOWN+RIGHT)
|
return self.default_pi_creature_class(**self.default_pi_creature_kwargs).to_corner(DOWN+RIGHT)
|
||||||
|
|
||||||
def get_pi_creatures(self):
|
def get_pi_creatures(self):
|
||||||
return self.pi_creatures
|
return self.pi_creatures
|
||||||
|
|
Loading…
Add table
Reference in a new issue