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

committed by
GitHub

parent
030fb52018
commit
c94ebaa260
@ -994,6 +994,16 @@ class VGroup(VMobject):
|
||||
super().__init__(**kwargs)
|
||||
self.add(*vmobjects)
|
||||
|
||||
def __add__(self:'VGroup', other : 'VMobject' or 'VGroup'):
|
||||
assert(isinstance(other, VMobject))
|
||||
if isinstance(other, VGroup):
|
||||
return VGroup(*self, *other)
|
||||
if isinstance(other, Mobject):
|
||||
return Group(*self) + other
|
||||
if other in self:
|
||||
return self.add(other.copy())
|
||||
return self.add(other)
|
||||
|
||||
|
||||
class VectorizedPoint(Point, VMobject):
|
||||
CONFIG = {
|
||||
|
Reference in New Issue
Block a user