Skip to content

MLP212: long full-screen translucent animation

qual reports MLP212 when a FullScreenRectangle with an exact, stable fill opacity strictly between 0 and 1 is directly animated for a provable five seconds or longer. The layer covers the output frame, so every rendered frame performs a full-area alpha blend with the pixels below it.

  • Default severity: info
  • Minimum confidence: medium
  • Implementation phase: 3
  • Profiles: every active renderer profile
  • Fix: none

The rule requires all of the following:

  • singleton identity and the exact curated FullScreenRectangle class;
  • no constructor aspect_ratio override or argument splat, and every active render profile has the inherited exact 16:9 aspect ratio;
  • a literal-derived fill opacity with 0 < opacity < 1 at the play;
  • a certain direct target animation whose complete write channels do not include style or opacity;
  • no active mobject or Scene updater; and
  • a duration lower bound of at least five seconds (FULL_SCREEN_TRANSLUCENT_SECONDS_GATE).

Evidence includes the real duration/frame bounds and each active profile's frame area and pixel-frame product. Unknown opacity, unknown duration, branch-only plays, opacity-changing animations, project subclasses, non-16:9 profiles, and short transitions stay silent.

Wrong

class Demo(Scene):
    def construct(self):
        overlay = FullScreenRectangle(fill_opacity=0.4, stroke_width=0)
        self.add(overlay)
        self.play(overlay.animate.scale(1.01), run_time=6)

Keep the translucent interval short, or animate only the region that needs the overlay:

class Demo(Scene):
    def construct(self):
        overlay = Rectangle(width=4, height=2, fill_opacity=0.4)
        self.play(overlay.animate.scale(1.01), run_time=2)