-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWorldSeedAnimation.py
More file actions
60 lines (47 loc) · 2.69 KB
/
Copy pathWorldSeedAnimation.py
File metadata and controls
60 lines (47 loc) · 2.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
from manim import *
PATH = 'C:\\Users\Pedro\Desktop\manimAnimations\images'
class Animate(Scene):
def construct(self):
map = ImageMobject(f"{PATH}\\MinecraftMap.png").move_to([-1, -1, 0]);
map.height = 2.5
number = always_redraw(lambda: Text("Seed: 12432275434", font="Minecraftia").move_to(UP*2+RIGHT*0.6).scale(1));
arrow = always_redraw(lambda: Line(start=number.get_bottom(),end=map.get_top(), buff=0.2).add_tip())
self.play(DrawBorderThenFill(number))
self.play(FadeIn(map))
self.play(DrawBorderThenFill(arrow))
map2 = ImageMobject(f"{PATH}\\MinecraftMap2.png").next_to(map,RIGHT, buff=1)
map2.height = 2.5
arrow2 = Line(start=number.get_bottom(), end=map2.get_top(),buff=0.2).add_tip();
self.play(DrawBorderThenFill(arrow2),FadeIn(map2))
icon = SVGMobject(f"{PATH}\\Red_X.svg").move_to(arrow2.get_midpoint()).scale(0.2)
self.play(DrawBorderThenFill(icon))
self.wait(2)
class WorldSize(Scene):
def construct(self):
earth = ImageMobject(f"{PATH}\\Earth.png").scale(0.3).to_edge(LEFT,buff=2.5)
self.play(FadeIn(earth))
earthName = Text("Terra", font="Minecraftia",font_size=24).next_to(earth,DOWN)
earthSurfaceArea = Text("Área: 510,064,000km²",font="Minecraftia",font_size=24).next_to(earth,UP)
earthRadius = Text("Raio: 6,371km",font="Minecraftia",font_size=24).next_to(earthSurfaceArea,UP)
self.play(Write(VGroup(earthName,earthSurfaceArea, earthRadius)))
minecraftMap = ImageMobject(f"{PATH}\\MinecraftWorldSingle.png").to_edge(RIGHT, buff=2.5)
minecraftName = Text("Minecraft Map", font="Minecraftia",font_size=24).next_to(minecraftMap,DOWN)
minecraftSurfaceArea = Text("Área: 3,600,000,000km²",font="Minecraftia",font_size=24).next_to(minecraftMap,UP)
minecraftRadius = Text("Raio: 16,925km",font="Minecraftia",font_size=24).next_to(minecraftSurfaceArea,UP)
self.play(FadeIn(minecraftMap))
self.play(Write(VGroup(minecraftName,minecraftSurfaceArea,minecraftRadius)))
self.wait(2)
class PerlinNoise(Scene):
def construct(self):
noiseImg = ImageMobject(f"{PATH}\\PerlinNoise.png").scale(2)
self.play(FadeIn(noiseImg))
perlin = Text("Perlin noise",font="Minecraftia",font_size=30).next_to(noiseImg,DOWN)
self.play(Write(perlin))
self.wait(4)
class WhiteNoise(Scene):
def construct(self):
noiseImg = ImageMobject(f"{PATH}\\WhiteNoise.jpeg").scale(2)
self.play(FadeIn(noiseImg))
perlin = Text("White noise",font="Minecraftia",font_size=30).next_to(noiseImg,DOWN)
self.play(Write(perlin))
self.wait(4)