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
467 B
Raw Blame
# Source: manim/animation/speedmodifier.py
import manimgx as m


class SpeedModifierUpdaterExample2(m.Scene):
    def construct(self):
        a = m.Dot().shift(m.LEFT * 4)
        self.add(a)

        m.ChangeSpeed.add_updater(a, lambda x, dt: x.shift(m.RIGHT * 4 * dt))
        self.wait()
        self.play(
            m.ChangeSpeed(
                m.Wait(),
                speedinfo={1: 0},
                affects_speed_updaters=True,
            )
        )