Skip to contents

A "virtual" mobject that holds a single numeric value. Used with updaters to drive animations based on changing parameters.

Super class

manimR::MObject -> ValueTracker

Public fields

value

The tracked numeric value

Methods

Inherited methods


Method new()

Create a ValueTracker

Usage

ValueTracker$new(value = 0)

Arguments

value

Initial value


Method get_value()

Get the current value

Usage

ValueTracker$get_value()


Method set_value()

Set the value

Usage

ValueTracker$set_value(new_value)

Arguments

new_value

New numeric value


Method increment_value()

Increment the value

Usage

ValueTracker$increment_value(delta)

Arguments

delta

Amount to add


Method animate_value()

Animate the value from current to target

Usage

ValueTracker$animate_value(target_value, run_time = 1, rate_func = "smooth")

Arguments

target_value

Final value

run_time

Duration

rate_func

Easing

Returns

An Animation that changes the value


Method clone()

The objects of this class are cloneable with this method.

Usage

ValueTracker$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.