mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Update vectorized_mobject.py
This commit is contained in:
parent
030fb52018
commit
c94ebaa260
1 changed files with 10 additions and 0 deletions
|
@ -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 = {
|
||||
|
|
Loading…
Add table
Reference in a new issue