mirror of
https://github.com/3b1b/manim.git
synced 2025-04-13 09:47:07 +00:00
Fixed bubble sort bug
This commit is contained in:
parent
df5d45e5ae
commit
fb08fc0401
3 changed files with 3 additions and 5 deletions
|
@ -526,7 +526,7 @@ class ThoughtBubble(Bubble):
|
||||||
def __init__(self, **kwargs):
|
def __init__(self, **kwargs):
|
||||||
Bubble.__init__(self, **kwargs)
|
Bubble.__init__(self, **kwargs)
|
||||||
self.submobjects.sort(
|
self.submobjects.sort(
|
||||||
lambda m1, m2: int((m1.get_bottom() - m2.get_bottom())[1])
|
key=lambda m: m.get_bottom()[1]
|
||||||
)
|
)
|
||||||
|
|
||||||
def make_green_screen(self):
|
def make_green_screen(self):
|
||||||
|
|
|
@ -147,7 +147,7 @@ class VMobject(Mobject):
|
||||||
|
|
||||||
def match_style(self, vmobject):
|
def match_style(self, vmobject):
|
||||||
for a_name in ["fill_rgbas", "stroke_rgbas", "background_stroke_rgbas"]:
|
for a_name in ["fill_rgbas", "stroke_rgbas", "background_stroke_rgbas"]:
|
||||||
setattr(self, np.array(get_attr(vmobject, a_name)))
|
setattr(self, a_name, np.array(getattr(vmobject, a_name)))
|
||||||
self.stroke_width = vmobject.stroke_width
|
self.stroke_width = vmobject.stroke_width
|
||||||
self.background_stroke_width = vmobject.background_stroke_width
|
self.background_stroke_width = vmobject.background_stroke_width
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
|
|
||||||
from big_ol_pile_of_manim_imports import *
|
from big_ol_pile_of_manim_imports import *
|
||||||
|
|
||||||
from old_projects.lost_lecture import Orbiting
|
from old_projects.lost_lecture import Orbiting
|
||||||
from old_projects.lost_lecture import ShowWord
|
from old_projects.lost_lecture import ShowWord
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class LogoGeneration(LogoGenerationTemplate):
|
class LogoGeneration(LogoGenerationTemplate):
|
||||||
CONFIG = {
|
CONFIG = {
|
||||||
"random_seed": 2,
|
"random_seed": 2,
|
||||||
|
@ -53,7 +51,7 @@ class ThinkingAboutAProof(PiCreatureScene):
|
||||||
cloud.rotate(90 * DEGREES)
|
cloud.rotate(90 * DEGREES)
|
||||||
cloud.set_height(FRAME_HEIGHT - 0.5)
|
cloud.set_height(FRAME_HEIGHT - 0.5)
|
||||||
cloud.stretch(2.8, 0)
|
cloud.stretch(2.8, 0)
|
||||||
cloud.next_to(bubble[0], RIGHT)
|
cloud.next_to(bubble[2], RIGHT)
|
||||||
cloud.to_edge(UP, buff=0.25)
|
cloud.to_edge(UP, buff=0.25)
|
||||||
bubble[1].shift(0.25 * UL)
|
bubble[1].shift(0.25 * UL)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue