Commit c900f17f authored by Ethan Fisher's avatar Ethan Fisher
Browse files

Merge branch 'main' of gitlab.cs.washington.edu:shivbat/project_toon_cse457 into main

parents a10a8690 188dc057
......@@ -8,12 +8,25 @@ class Slide:
self.objects = objects
self.durations = durations
class Slide1(Scene):
class Slides(Scene):
def construct(self):
self.slideshow([
Slide([self.get_image_group(["giraffe.jpg"])], [3]),
Slide([self.get_image_group(["giraffe.jpg", "giraffe.jpg", "giraffe2.jpg"])], [3]),
])
def get_spaced_text(text, im):
spacer = Text("d",font_size=90).scale(0.5).align_to(im,DOWN)
return Text(text,color="white",font_size=90).scale(0.5).next_to(spacer, UP)
def get_sphere_slide(im_path, text, durations):
im = ImageMobject(im_path).scale_to_fit_height(SCREEN_HEIGHT)
return Slide([
im,
get_spaced_text(text, im)
], durations)
slides = [
Slide([self.get_image_group(["raster_vs_raytrace.webp"])], [3]),
get_sphere_slide("sad_sphere.png", "\"I'm not smooth\" :(", [3, 3]),
get_sphere_slide("happy_sphere.png", "\"I'm smooth!\" :)", [3, 3])
]
self.slideshow(slides)
def slideshow(self, slides):
for slide in slides:
......@@ -35,18 +48,6 @@ class Slide1(Scene):
group.arrange()
return group
class SadSphere(Scene):
def construct(self):
im = ImageMobject("sad_sphere.png")
im.scale_to_fit_height(SCREEN_HEIGHT)
spacer = Text("d",font_size=90).scale(0.5).align_to(im,DOWN)
text = Text("\"I'm not smooth\" :(",color="white",font_size=90).scale(0.5).next_to(spacer,UP)
self.play(FadeIn(im))
self.wait(3)
self.play(FadeIn(text))
self.wait(3)
self.play(FadeOut(im, text))
class Title(Scene):
def construct(self):
t2 = Text("d",color="black",font_size=90).scale(0.25)
......@@ -61,18 +62,6 @@ class Title(Scene):
self.play(FadeIn(t4),lag_ratio=0.1,run_time=0.5)
self.wait(3)
self.play(FadeOut(t0,t1,t3,t4))
class HappySphere(Scene):
def construct(self):
im = ImageMobject("happy_sphere.png")
im.scale_to_fit_height(SCREEN_HEIGHT)
spacer = Text("d",font_size=90).scale(0.5).align_to(im,DOWN)
text = Text("\"I'm smooth!\" :)",color="white",font_size=90).scale(0.5).next_to(spacer,UP)
self.play(FadeIn(im))
self.wait(3)
self.play(FadeIn(text))
self.wait(3)
self.play(FadeOut(im, text))
class RasterizationTriangleScene(ThreeDScene):
def construct(self):
......@@ -110,4 +99,6 @@ class RasterizationTriangleScene(ThreeDScene):
self.wait(1)
class RaytracingScene(Scene):
pass
def construct(self):
square = Square(side_length=3)
square.shift([1, 1])
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment