aboutsummaryrefslogtreecommitdiffstats
path: root/scenes/v1_montyhall.py
diff options
context:
space:
mode:
authorElvis Claros Castro <elvis@claros.ar>2026-09-26 20:50:41 -0300
committerElvis Claros Castro <elvis@claros.ar>2026-09-26 20:50:41 -0300
commitfafaebb051907a848a9406f9da19669c81a83a3b (patch)
treec30ea26e6b549e5523af2bae5c39569e9a946b12 /scenes/v1_montyhall.py
parent59355909f2de9236af8168a26c70bcf6caa3b285 (diff)
download100cia-videos-fafaebb051907a848a9406f9da19669c81a83a3b.tar.gz
100cia-videos-fafaebb051907a848a9406f9da19669c81a83a3b.zip
Translate code, comments and logs to English; English README; configurable paths and env varsHEADmain
Identifiers, docstrings, comments and console messages are now in English. Narration, subtitles and on-screen text stay in Spanish (they are the video content). The Blender <-> Godot physics protocol uses English keys and body prefixes chosen to keep the original creation order, so cached simulations and renders stay bit-identical. The old Spanish environment variable names are still accepted.
Diffstat (limited to 'scenes/v1_montyhall.py')
-rw-r--r--scenes/v1_montyhall.py44
1 files changed, 22 insertions, 22 deletions
diff --git a/scenes/v1_montyhall.py b/scenes/v1_montyhall.py
index bdaf6c5..5e0ec95 100644
--- a/scenes/v1_montyhall.py
+++ b/scenes/v1_montyhall.py
@@ -27,7 +27,7 @@ class MontyHall(TikTok):
stroke_width=0, fill_color=color, fill_opacity=1)
return VGroup(box, t)
- def car_icon(self, color=VERDE):
+ def car_icon(self, color=C_GREEN):
body = RoundedRectangle(corner_radius=0.14, width=1.6, height=0.6,
stroke_width=0, fill_color=color, fill_opacity=1)
roof = RoundedRectangle(corner_radius=0.12, width=0.92, height=0.48,
@@ -51,7 +51,7 @@ class MontyHall(TikTok):
def prize(self, kind, x):
if kind == "auto":
- g = VGroup(self.car_icon(), self.badge("AUTO", VERDE))
+ g = VGroup(self.car_icon(), self.badge("AUTO", C_GREEN))
else:
g = VGroup(self.goat_icon(), self.badge("CABRA", "#94A3B8"))
g.arrange(DOWN, buff=0.3)
@@ -66,7 +66,7 @@ class MontyHall(TikTok):
b.play(FadeIn(chip, shift=DOWN * 0.3), run_time=0.5)
b.play(LaggedStart(*[GrowFromCenter(d) for d in doors], lag_ratio=0.25), run_time=1.2)
h1 = VGroup(self.car_icon().scale(0.85),
- Text("×1", font=FONT, font_size=46, weight=BOLD, color=VERDE)
+ Text("×1", font=FONT, font_size=46, weight=BOLD, color=C_GREEN)
).arrange(RIGHT, buff=0.35).move_to(UP * 1.3)
b.play(FadeIn(h1, shift=UP * 0.2), run_time=0.5)
@@ -80,12 +80,12 @@ class MontyHall(TikTok):
b.play(FadeOut(VGroup(h1, h2)), run_time=0.4)
with self.beat(2) as b:
- pick = Text("TU ELECCIÓN", font=FONT, font_size=38, weight=BOLD, color=AMBAR)
+ pick = Text("TU ELECCIÓN", font=FONT, font_size=38, weight=BOLD, color=AMBER)
arrow = Arrow(doors[0].get_bottom() + DOWN * 1.3, doors[0].get_bottom() + DOWN * 0.12,
- buff=0, color=AMBAR, stroke_width=10)
+ buff=0, color=AMBER, stroke_width=10)
pick.next_to(arrow, DOWN, buff=0.18)
- b.play(doors[0].face.animate.set_stroke(AMBAR, 11),
- doors[0].num.animate.set_color(AMBAR), run_time=0.5)
+ b.play(doors[0].face.animate.set_stroke(AMBER, 11),
+ doors[0].num.animate.set_color(AMBER), run_time=0.5)
b.play(GrowArrow(arrow), FadeIn(pick), run_time=0.5)
picked = VGroup(pick, arrow)
@@ -100,15 +100,15 @@ class MontyHall(TikTok):
with self.beat(4) as b:
q = Text("¿1 o 2?", font=FONT, font_size=82, weight=BOLD, color=WHITE).move_to(UP * 1.0)
b.play(FadeOut(picked), run_time=0.3)
- b.play(Write(q), doors[1].face.animate.set_stroke(CELESTE, 10),
- doors[1].num.animate.set_color(CELESTE), run_time=1.0)
+ b.play(Write(q), doors[1].face.animate.set_stroke(C_SKY, 10),
+ doors[1].num.animate.set_color(C_SKY), run_time=1.0)
with self.beat(5) as b:
- fifty = Text("50% / 50%", font=FONT, font_size=68, weight=BOLD, color=GRIS)
+ fifty = Text("50% / 50%", font=FONT, font_size=68, weight=BOLD, color=C_GRAY)
fifty.move_to(DOWN * 1.5)
cross = VGroup(
- Line(fifty.get_corner(UL), fifty.get_corner(DR), stroke_width=14, color=ROSA),
- Line(fifty.get_corner(DL), fifty.get_corner(UR), stroke_width=14, color=ROSA),
+ Line(fifty.get_corner(UL), fifty.get_corner(DR), stroke_width=14, color=C_PINK),
+ Line(fifty.get_corner(DL), fifty.get_corner(UR), stroke_width=14, color=C_PINK),
)
b.play(FadeIn(fifty), run_time=0.5)
b.wait(0.6)
@@ -116,15 +116,15 @@ class MontyHall(TikTok):
b.play(FadeOut(VGroup(fifty, cross, q)), run_time=0.5)
with self.beat(6) as b:
- f1 = MathTex(r"\tfrac{1}{3}", color=AMBAR).scale(2.6).next_to(doors[0], DOWN, buff=0.7)
- cap1 = Text("lo que tenías al elegir", font=FONT, font_size=34, color=GRIS)
+ f1 = MathTex(r"\tfrac{1}{3}", color=AMBER).scale(2.6).next_to(doors[0], DOWN, buff=0.7)
+ cap1 = Text("lo que tenías al elegir", font=FONT, font_size=34, color=C_GRAY)
cap1.next_to(f1, DOWN, buff=0.45).set_x(0)
b.play(Write(f1), run_time=0.8)
b.play(FadeIn(cap1), run_time=0.5)
with self.beat(7) as b:
- brace = Brace(VGroup(doors[1], doors[2]), DOWN, color=CELESTE, buff=0.28)
- f2 = MathTex(r"\tfrac{2}{3}", color=CELESTE).scale(2.6).next_to(brace, DOWN, buff=0.25)
+ brace = Brace(VGroup(doors[1], doors[2]), DOWN, color=C_SKY, buff=0.28)
+ f2 = MathTex(r"\tfrac{2}{3}", color=C_SKY).scale(2.6).next_to(brace, DOWN, buff=0.25)
b.play(FadeOut(cap1), run_time=0.25)
b.play(GrowFromCenter(brace), run_time=0.5)
b.play(Write(f2), run_time=0.7)
@@ -133,13 +133,13 @@ class MontyHall(TikTok):
dest = f1.get_center() + RIGHT * (XS[1] - XS[0])
b.play(FadeOut(brace), run_time=0.3)
b.play(f2.animate.move_to(dest), run_time=1.2)
- b.play(Flash(f2, color=CELESTE, line_length=0.6, num_lines=18, flash_radius=1.4),
+ b.play(Flash(f2, color=C_SKY, line_length=0.6, num_lines=18, flash_radius=1.4),
doors[1].face.animate.set_fill("#123A57", 1), run_time=0.9)
with self.beat(9) as b:
b.play(FadeOut(VGroup(doors, f1, f2, goat)), run_time=0.5)
rows = []
- for lbl, pct, col in (("QUEDARSE", 0.333, ROSA), ("CAMBIAR", 0.667, VERDE)):
+ for lbl, pct, col in (("QUEDARSE", 0.333, C_PINK), ("CAMBIAR", 0.667, C_GREEN)):
name = Text(lbl, font=FONT, font_size=46, weight=BOLD, color=col)
track = RoundedRectangle(corner_radius=0.12, width=7.0, height=0.85, stroke_width=0,
fill_color="#1B2233", fill_opacity=1)
@@ -158,9 +158,9 @@ class MontyHall(TikTok):
b.wait(0.3)
with self.beat(10) as b:
- cta = self.fit(Text("CAMBIÁ SIEMPRE", font=FONT, font_size=70,
- weight=BOLD, color=AMBAR), 7.9).move_to(DOWN * 1.9)
- b.play(Write(cta), run_time=0.9)
- b.play(Circumscribe(cta, color=AMBAR, buff=0.35, stroke_width=8), run_time=1.1)
+ count_txt = self.fit(Text("CAMBIÁ SIEMPRE", font=FONT, font_size=70,
+ weight=BOLD, color=AMBER), 7.9).move_to(DOWN * 1.9)
+ b.play(Write(count_txt), run_time=0.9)
+ b.play(Circumscribe(count_txt, color=AMBER, buff=0.35, stroke_width=8), run_time=1.1)
self.finish()