Skip to content

The animation engine for agents: blazingly fast math and 3D videos with Manim's Python API, on a Rust GPU core.

Python
414 B
Raw Blame
# Source: manimgx API coverage (CE 0.21 `Scene.remove_updater`)
import manimgx as m


class SceneRemoveUpdaterExample(m.Scene):
    def construct(self):
        dot = m.Dot(3 * m.LEFT, color=m.YELLOW)
        self.add(dot)

        def drift(dt: float) -> None:
            dot.shift(3 * dt * m.RIGHT)

        self.add_updater(drift)
        self.wait(1)
        self.remove_updater(drift)
        self.wait(0.5)