本文整理匯總了Python中mobject.vectorized_mobject.VGroup.move_to方法的典型用法代碼示例。如果您正苦於以下問題:Python VGroup.move_to方法的具體用法?Python VGroup.move_to怎麽用?Python VGroup.move_to使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類mobject.vectorized_mobject.VGroup
的用法示例。
在下文中一共展示了VGroup.move_to方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: __init__
# 需要導入模塊: from mobject.vectorized_mobject import VGroup [as 別名]
# 或者: from mobject.vectorized_mobject.VGroup import move_to [as 別名]
def __init__(self, *args, **kwargs):
PiCreature.__init__(self, *args, **kwargs)
self.scale(self.scale_factor)
self.shift(LEFT)
self.to_edge(DOWN, buff = LARGE_BUFF)
eyes = VGroup(self.eyes, self.pupils)
eyes_bottom = eyes.get_bottom()
eyes.scale(self.eye_scale_factor)
eyes.move_to(eyes_bottom, aligned_edge = DOWN)
looking_direction = self.get_looking_direction()
for pupil in self.pupils:
pupil.scale_in_place(self.pupil_scale_factor)
self.look(looking_direction)
示例2: get_eyes
# 需要導入模塊: from mobject.vectorized_mobject import VGroup [as 別名]
# 或者: from mobject.vectorized_mobject.VGroup import move_to [as 別名]
def get_eyes(self, mode = None, thing_to_look_at = None):
mode = mode or self.mode
if thing_to_look_at is None:
thing_to_look_at = self.thing_looked_at
pi = Randolph(mode = mode)
eyes = VGroup(pi.eyes, pi.pupils)
eyes.scale_to_fit_height(self.height)
if self.submobjects:
eyes.move_to(self, DOWN)
else:
eyes.move_to(self.mobject.get_top(), DOWN)
if thing_to_look_at is not None:
pi.look_at(thing_to_look_at)
return eyes