question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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
  • ?

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
huguesdevimeuxcommented, Oct 5, 2020

That’s an issue to solve. Maybe we can keep increment_value, then.

1reaction
friedkeenancommented, May 15, 2021

I think the value can be a property, but we should keep the set_value around to ensure we are still able to use the .animate syntax effectively.

That’s what Mobject.set is for, so you could do value_tracker.animate.set(value=1)

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found