當前位置: 首頁>>代碼示例>>Python>>正文


Python VGroup.move_to方法代碼示例

本文整理匯總了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)
開發者ID:aquafemi,項目名稱:manim,代碼行數:15,代碼來源:characters.py

示例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
開發者ID:PythonJedi,項目名稱:manim,代碼行數:17,代碼來源:characters.py


注:本文中的mobject.vectorized_mobject.VGroup.move_to方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。