mirror of
https://github.com/3b1b/videos.git
synced 2025-09-18 21:38:53 +00:00
Small tweaks to add saturated MetaFractal example
This commit is contained in:
parent
14a09b52b4
commit
549c559f83
2 changed files with 9 additions and 3 deletions
|
@ -3436,7 +3436,7 @@ class LinksBelow(TeacherStudentsScene):
|
|||
look_at_arg=FRAME_HEIGHT * DOWN,
|
||||
)
|
||||
self.wait(2)
|
||||
self.play(self.teacher.change("happy"))
|
||||
self.play(self.teacher.animate.change("happy"))
|
||||
self.wait(4)
|
||||
|
||||
|
||||
|
@ -3567,6 +3567,11 @@ class MetaFractal(IntroPolyFractal):
|
|||
rate_func=bezier([0, 0, 1, 1])
|
||||
)
|
||||
self.wait()
|
||||
self.play(
|
||||
fractal.animate.set_color_mult(1.03),
|
||||
run_time=3
|
||||
)
|
||||
self.wait()
|
||||
self.play(
|
||||
UpdateFromAlphaFunc(
|
||||
frame,
|
||||
|
@ -3582,6 +3587,7 @@ class MetaFractal(IntroPolyFractal):
|
|||
),
|
||||
run_time=10
|
||||
)
|
||||
self.wait()
|
||||
|
||||
|
||||
class Part1EndScroll(PatreonEndScreen):
|
||||
|
|
|
@ -158,7 +158,7 @@ class PolyFractal(Mobject):
|
|||
return self
|
||||
|
||||
def set_color_mult(self, color_mult):
|
||||
self.uniforms["color_mult"] = color_mult
|
||||
self.uniforms["color_mult"] = float(color_mult)
|
||||
return self
|
||||
|
||||
def set_opacities(self, *opacities):
|
||||
|
@ -196,7 +196,7 @@ class MetaPolyFractal(PolyFractal):
|
|||
|
||||
def set_z0(self, z0):
|
||||
z0 = complex(z0)
|
||||
self.uniforms["z0"] = (z0.real, z0.imag)
|
||||
self.uniforms["z0"] = np.array([z0.real, z0.imag])
|
||||
|
||||
|
||||
# Scenes
|
||||
|
|
Loading…
Add table
Reference in a new issue