Update mobject.py

This commit is contained in:
Bill Xi 2021-10-31 18:34:23 +08:00 committed by GitHub
parent c60e97ebf9
commit 4eabaecfc8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -83,14 +83,10 @@ class Mobject(object):
return self.__class__.__name__
def __add__(self, other : 'Mobject'):
assert(isinstance(other, Mobject))
return Group(self, other)
def __mul__(self, other : 'int'):
from manimlib.mobject.types.vectorized_mobject import VMobject, VGroup
if isinstance(self, VMobject):
return VGroup(*[self.copy() for i in range(other)])
return Group(*[mob.copy() for mob in range(other)])
return self.replicate(other)
def init_data(self):
self.data = {