예제 #1
0
 def __init__(self, mobject, **kwargs):
     target = mobject.copy()
     Transform.__init__(self, mobject, target, **kwargs)
     self.starting_mobject.fade(1)
     if isinstance(self.starting_mobject, VMobject):
         self.starting_mobject.set_stroke(width=0)
         self.starting_mobject.set_fill(opacity=0)
예제 #2
0
 def __init__(self, mobject, direction=None, **kwargs):
     digest_config(self, kwargs)
     target = mobject.copy()
     if direction is None:
         direction = self.direction
     mobject.shift(direction)
     mobject.fade(1)
     Transform.__init__(self, mobject, target, **kwargs)
예제 #3
0
 def __init__(self, mobject, point, **kwargs):
     digest_config(self, kwargs)
     target = mobject.copy()
     point_mob = VectorizedPoint(point)
     if self.point_color:
         point_mob.set_color(self.point_color)
     mobject.replace(point_mob)
     mobject.set_color(point_mob.get_color())
     Transform.__init__(self, mobject, target, **kwargs)
예제 #4
0
    def __init__(self, mobject_or_point, **kwargs):
        digest_config(self, kwargs)
        big_dot = Dot(
            radius=FRAME_X_RADIUS + FRAME_Y_RADIUS,
            stroke_width=0,
            fill_color=self.color,
            fill_opacity=0,
        )
        little_dot = Dot(radius=0)
        little_dot.set_fill(self.color, opacity=self.opacity)
        little_dot.move_to(mobject_or_point)

        Transform.__init__(self, big_dot, little_dot, **kwargs)
예제 #5
0
 def __init__(self, mobject, angle=np.pi, axis=OUT, **kwargs):
     if "path_arc" not in kwargs:
         kwargs["path_arc"] = angle
     if "path_arc_axis" not in kwargs:
         kwargs["path_arc_axis"] = axis
     digest_config(self, kwargs, locals())
     target = mobject.copy()
     if self.in_place:
         self.about_point = mobject.get_center()
     target.rotate(
         angle,
         axis=axis,
         about_point=self.about_point,
     )
     Transform.__init__(self, mobject, target, **kwargs)
예제 #6
0
 def __init__(self, mobject, **kwargs):
     Transform.__init__(self, mobject, mobject.get_point_mobject(),
                        **kwargs)
예제 #7
0
 def __init__(self, mobject, **kwargs):
     target = mobject.copy()
     target.fade(1)
     Transform.__init__(self, mobject, target, **kwargs)
예제 #8
0
 def __init__(self, mobject, **kwargs):
     digest_config(self, kwargs)
     target = mobject.copy()
     target.scale_in_place(self.scale_factor)
     target.set_color(self.color)
     Transform.__init__(self, mobject, target, **kwargs)
예제 #9
0
 def __init__(self, mobject, **kwargs):
     mob_copy = mobject.copy()
     mob_copy.reverse_points()
     Transform.__init__(self, mobject, mob_copy, **kwargs)