ManimCommunity / ManimCommunity/manim
Manim 0.18.1: Updaters don't work with objects which have been added using LaggedStart()
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 40.9k
- Forks
- 3.1k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 25
Description
Description of bug / unexpected behavior
When adding an object to a scene using LaggedStart() no updaters are recognized:
- not when using
.add_updater()before adding to the scene - not
always_redraw()objects - not when using
.add_updater()after adding to the scene
Expected behavior
well, updaters should be executed... Especially when added afterwards
How to reproduce the issue
Code for reproducing the problem
class laggingUpdater(Scene):
def construct(self):
vt = ValueTracker(0)
dot1a = Dot().shift(3*UP)
dot2a = Dot().shift(2*UP)
dot3a = always_redraw(lambda:
Dot().shift(1*UP+vt.get_value()*RIGHT)
)
dot1b = Dot().shift(1*DOWN)
dot2b = Dot().shift(2*DOWN)
dot3b = always_redraw(lambda:
Dot().shift(3*DOWN+vt.get_value()*RIGHT)
)
def updater(mobj):
mobj.set_x(vt.get_value())
dot1a.add_updater(updater)
dot1b.add_updater(updater)
self.play(
LaggedStart(
Create(dot1a),
Create(dot2a),
Create(dot3a)
)
)
self.play(
Create(dot1b),
Create(dot2b),
Create(dot3b)
)
dot2a.add_updater(updater)
dot2b.add_updater(updater)
self.wait()
self.play(vt.animate.set_value(7),run_time=4)
self.wait()
Additional media files
System specifications
System Details
- OS: Windows 10
- RAM: enough
- Python version: 3.11.6
- Manim v0.18.1
PASTE HERE
</details>
## Additional comments
https://discord.com/channels/581738731934056449/1293588131999907851/1293588131999907851
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the LaggedStart, Scene.play, updater, and always_redraw behavior shown in the reproduction, using the provided example to compare lagged and non-lagged animations. Trace how objects enter the scene and how updaters are executed; done means all listed updater cases work during and after LaggedStart without breaking the regular Create case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100