ManimCommunity / ManimCommunity/manim

Split `add_updater` into `add_updater` and `add_dt_updater`

Open
#2,452 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
40.9k
Forks
3.1k
Avg merge
3d 12h
Merged PRs (30d)
25

Description

Enhancement proposal

Currently, Manim supports two types of updaters, "normal" and "dt" updaters. Despite the fundamental logic behind each updater function being different, they are both attached to a Mobject via an add_updater method. To tell the difference, Manim checks whether the updater function has a dt parameter and handles it as a time based updater if so, and a different way if not. This is extremely confusing and a significant impediment for anyone trying to learn how updaters work beyond surface level pattern matching as no reasonable person would expect the logic of how an updater is handled to differ based on whether a magical parameter name is in their function signature or not. Furthermore, it puts a responsibility on the library to use hacky and unclean methods to separate the two types of updaters, where they should just be explicitly specified by the user via the two proposed methods.

Additional comments

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in manim/mobject/mobject.py, especially the updater handling around lines 799-804, and trace how add_updater distinguishes normal and dt updaters. Define the scope for separate add_updater and add_dt_updater methods, including how existing updater behavior should transition; done means the two updater types are explicitly selected rather than inferred from a parameter name.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
computer-graphics
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.