ValueTracker: turn value into a property, replace get_value / set_value
See original GitHub issueValueTracker 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
andset_value
in favor of a property; - Changing
increment_value
, maybe getting rid of it as we have now += operator for ValueTracker - ?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:7 (5 by maintainers)
Top Results From Across the Web
ValueTracker - Manim Community v0.17.1
A mobject that can be used for tracking (real-valued) parameters. Useful for animating parameter changes. Not meant to be displayed. Instead the position ......
Read more >Change property value [duplicate] - Stack Overflow
replace this code : you should pass instance of object to getValue() or setValue() not property public static T LocalTime<T>(T value, ...
Read more >Working with property values - EF6 | Microsoft Learn
Getting and setting the current or original value of an individual property. Use the OriginalValue property instead of the CurrentValue ...
Read more >javax.jcr.Property.setValue java code examples - Tabnine
Returns a boolean representation of the value of this property. A shortcut for Property.getValue(). remove · isMultiple. Returns true if this property is...
Read more >what is ValueTracker : r/manim - Reddit
ValueTracker is a class let you get increasing/decreasing value while playing scene. That is, let's suppose you want to animate number ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
That’s an issue to solve. Maybe we can keep increment_value, then.
That’s what
Mobject.set
is for, so you could dovalue_tracker.animate.set(value=1)