Example #1
0
 def get_moving_mobjects(self, *animations):
     moving_mobjects = Scene.get_moving_mobjects(self, *animations)
     all_moving_mobjects = Mobject.extract_mobject_family_members(
         moving_mobjects)
     movement_indicators = self.camera.get_mobjects_indicating_movement()
     for movement_indicator in movement_indicators:
         if movement_indicator in all_moving_mobjects:
             # When one of these is moving, the camera should
             # consider all mobjects to be moving
             return list_update(self.submobjects, moving_mobjects)
     return moving_mobjects
Example #2
0
 def get_moving_mobjects(self, *animations):
     moving_mobjects = Scene.get_moving_mobjects(self, *animations)
     all_moving_mobjects = self.camera.extract_mobject_family_members(
         moving_mobjects
     )
     movement_indicators = self.camera.get_mobjects_indicating_movement()
     for movement_indicator in movement_indicators:
         if movement_indicator in all_moving_mobjects:
             # When one of these is moving, the camera should
             # consider all mobjects to be moving
             return list_update(self.mobjects, moving_mobjects)
     return moving_mobjects
Example #3
0
 def get_moving_mobjects(self, *animations):
     """
     This method returns a list of all of the Mobjects in the Scene that
     are moving, that are also in the animations passed.
     Parameters
     ----------
     *animations (Animation)
         The animations whose mobjects will be checked.
     """
     moving_mobjects = Scene.get_moving_mobjects(self, *animations)
     camera_mobjects = self.camera.get_value_trackers()
     if any([cm in moving_mobjects for cm in camera_mobjects]):
         return self.mobjects
     return moving_mobjects
Example #4
0
    def get_moving_mobjects(self, *animations):
        """
        This method returns a list of all of the Mobjects in the Scene that
        are moving, that are also in the animations passed.

        Parameters
        ----------
        *animations (Animation)
            The animations whose mobjects will be checked.
        """
        moving_mobjects = Scene.get_moving_mobjects(self, *animations)
        all_moving_mobjects = self.camera.extract_mobject_family_members(
            moving_mobjects)
        movement_indicators = self.camera.get_mobjects_indicating_movement()
        for movement_indicator in movement_indicators:
            if movement_indicator in all_moving_mobjects:
                # When one of these is moving, the camera should
                # consider all mobjects to be moving
                return list_update(self.mobjects, moving_mobjects)
        return moving_mobjects
Example #5
0
 def get_moving_mobjects(self, *animations):
     moving_mobjects = Scene.get_moving_mobjects(self, *animations)
     camera_mobjects = self.camera.get_value_trackers()
     if any([cm in moving_mobjects for cm in camera_mobjects]):
         return self.mobjects
     return moving_mobjects
Example #6
0
 def get_moving_mobjects(self, *animations):
     moving_mobjects = Scene.get_moving_mobjects(self, *animations)
     camera_mobjects = self.camera.get_value_trackers()
     if any([cm in moving_mobjects for cm in camera_mobjects]):
         return self.mobjects
     return moving_mobjects