Wraps another animation and applies a custom speed profile.
The speed function maps normalised input time 0,1 to normalised
output time 0,1, allowing slow-motion, fast-forward, or custom
time curves.
Public fields
inner_animation
The wrapped animation
speed_func
Function mapping t -> t' (both in 0,1)
affects_speed_updaters
Whether speed changes affect updaters
Methods
Inherited methods
Method new()
Create a ChangeSpeed wrapper
Usage
ChangeSpeed$new(
animation,
speed_func = NULL,
run_time = NULL,
affects_speed_updaters = TRUE
)
Arguments
animation
The animation to wrap
speed_func
Function(t) -> t' mapping time, where both
input and output are in 0, 1
run_time
Override total run time
affects_speed_updaters
Whether updaters are affected
Method begin()
Delegate begin to inner animation
Method finish()
Delegate finish to inner animation
Method interpolate()
Apply speed remapping and delegate
Usage
ChangeSpeed$interpolate(alpha)
Arguments
alpha
Raw progress in 0, 1
Method interpolate_mobject()
No-op (delegation handled in interpolate)
Usage
ChangeSpeed$interpolate_mobject(alpha)
Method clone()
The objects of this class are cloneable with this method.
Usage
ChangeSpeed$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.