mirror of
https://github.com/3b1b/manim.git
synced 2025-07-29 21:12:35 +08:00
Update mobject.py
This commit is contained in:
@ -83,14 +83,10 @@ class Mobject(object):
|
|||||||
return self.__class__.__name__
|
return self.__class__.__name__
|
||||||
|
|
||||||
def __add__(self, other : 'Mobject'):
|
def __add__(self, other : 'Mobject'):
|
||||||
assert(isinstance(other, Mobject))
|
|
||||||
return Group(self, other)
|
return Group(self, other)
|
||||||
|
|
||||||
def __mul__(self, other : 'int'):
|
def __mul__(self, other : 'int'):
|
||||||
from manimlib.mobject.types.vectorized_mobject import VMobject, VGroup
|
return self.replicate(other)
|
||||||
if isinstance(self, VMobject):
|
|
||||||
return VGroup(*[self.copy() for i in range(other)])
|
|
||||||
return Group(*[mob.copy() for mob in range(other)])
|
|
||||||
|
|
||||||
def init_data(self):
|
def init_data(self):
|
||||||
self.data = {
|
self.data = {
|
||||||
|
Reference in New Issue
Block a user