Skip to content

Split add_updater into add_updater and add_dt_updater #2452

Open
@Darylgolden

Description

@Darylgolden

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementAdditions and improvements in general

    Type

    No type

    Projects

    Status

    🆕 New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions