value_tracker¶
- class janim.items.value_tracker.ValueTracker(value: T, copy_func: None = None, not_changed_func: None = None, interpolate_func: None = None, **kwargs)¶
Records a numerical value (the passed data as the initial value), can perform animation interpolation
For example:
tr = ValueTracker(0.5) self.play( tr.anim.set_value(3.5), DataUpdater(...) )
For more details, see the introduction to
ValueTrackerin Basic Usage- set_value(value: T) Self¶
Set current value
- get_value() T¶
Get current value
- increment(value: T) Self¶
Increment the value by
value; only works for some simple types
- update_value(patch: T) Self¶
Partially update the original dictionary based on the given dictionary