value_tracker

class janim.items.value_tracker.ValueTracker(value: T, **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 ValueTracker in 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