ManimCommunity / ManimCommunity/manim

ValueTracker: turn value into a property, replace get_value / set_value

Open
#510 7 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

ValueTracker needs a refactor.
Quoting @leotrs :

there's many other things left to do. For example, get_value and set_value should all go away in favor of a property. And increment_value should be changed to also make use of that property, such that the code self.play(tracker.increment_value, 4.0) doesn't break.

AND THEN, there's the question of whether we even want self.play(tracker.increment_value, 4.0) to continue working at all. It's always been a mystery to me why sometimes you need ApplyMethod and not at other times.

In a nutshell :

  • getting rid of get_value and set_value in favor of a property;
  • Changing increment_value, maybe getting rid of it as we have now += operator for ValueTracker
  • ?

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 by locating ValueTracker and all references to get_value, set_value, and increment_value. Read the surrounding animation usage, including self.play(tracker.increment_value, 4.0), and resolve whether that API should remain. Done means the property-based design and increment behavior are decided and all affected references are consistently updated.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.