mirror of
https://github.com/3b1b/manim.git
synced 2025-07-28 20:43:56 +08:00
Update mobject.py
This commit is contained in:

committed by
GitHub

parent
0fd8fdc3ca
commit
6d0c55d2ba
@ -82,6 +82,15 @@ class Mobject(object):
|
|||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.__class__.__name__
|
return self.__class__.__name__
|
||||||
|
|
||||||
|
def __add__(self, other : 'Mobject'):
|
||||||
|
assert(isinstance(other, Mobject))
|
||||||
|
return Group(self, other)
|
||||||
|
|
||||||
|
def __mul__(self, other : 'int'):
|
||||||
|
if isinstance(self, VMobject):
|
||||||
|
return VGroup(*[mob.copy() for mob in range(other)])
|
||||||
|
return Group(*[mob.copy() for mob in range(other)])
|
||||||
|
|
||||||
def init_data(self):
|
def init_data(self):
|
||||||
self.data = {
|
self.data = {
|
||||||
"points": np.zeros((0, 3)),
|
"points": np.zeros((0, 3)),
|
||||||
|
Reference in New Issue
Block a user