3b1b-manim/active_projects/eop/reusables/binary_option.py

13 lines
352 B
Python
Raw Normal View History

2018-05-03 17:48:09 +02:00
from mobject.types.vectorized_mobject import *
2018-05-03 18:45:25 +02:00
from mobject.svg.tex_mobject import *
2018-05-03 17:48:09 +02:00
class BinaryOption(VMobject):
def __init__(self, mob1, mob2, **kwargs):
VMobject.__init__(self, **kwargs)
text = TextMobject("or").scale(0.5)
mob1.next_to(text, LEFT)
mob2.next_to(text, RIGHT)
self.add(mob1, text, mob2)