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

16 lines
408 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):
2018-05-10 17:09:53 +02:00
CONFIG = {
"text_scale" : 0.5
}
2018-05-03 17:48:09 +02:00
def __init__(self, mob1, mob2, **kwargs):
VMobject.__init__(self, **kwargs)
2018-05-10 17:09:53 +02:00
text = TextMobject("or").scale(self.text_scale)
2018-05-03 17:48:09 +02:00
mob1.next_to(text, LEFT)
mob2.next_to(text, RIGHT)
self.add(mob1, text, mob2)