-1

I'm using manim and trying to reverse animation of a line (fading in from right to left instead of from left to right). I'm using this part of the documentation as a model : https://docs.manim.community/en/stable/reference/manim.animation.creation.Write.html?highlight=Write. It works well with text as the documentation shows, however with lines (and i guess more generally with Mobjects), it does not work, here is some code that proves it :

from manim import *
class test(Scene):
    def construct(self):
        l = Line(np.array([-1, 1, 0]), np.array([1, 1, 0]), stroke_width=0.5)
        self.play(Write(l, reverse = True))
        l = Line(np.array([-1, 0, 0]), np.array([1, 0, 0]), stroke_width=0.5)
        self.play(Write(l, reverse = False))

Any idea why the reverse = True is broken ?

Thank you!!

1 Answers1

1

I should add that I found a workaround by doing the following :

from manim import *
class testbis(Scene):
    def construct(self):
        l = Line(np.array([1, 1, 0]), np.array([-1, 1, 0]), stroke_width=0.5)
        self.play(Write(l))

It will do what i want but i need to invert the start and the end arguments of Line. Which is weird cos that's what reverse = True should do.