示例#1
0
文件: mobject.py 项目: tuchang/manim
 def update(self, dt):
     for updater in self.updaters:
         num_args = get_num_args(updater)
         if num_args == 1:
             updater(self)
         elif num_args == 2:
             updater(self, dt)
         else:
             raise Exception("Mobject updater expected 1 or 2 "
                             "arguments, %d given" % num_args)
示例#2
0
文件: mobject.py 项目: tuchang/manim
 def get_time_based_updaters(self):
     return [
         updater for updater in self.updaters if get_num_args(updater) == 2
     ]