Split an animation into chunks
Sometimes it is of interest to split an animation out in smaller chunks so
they can be orchestrated, e.g. in a presentation. This function lets you
provide a 'factor' to split by in the same way as
base::split() though this
one will be evaluated in the context of the animations
so you can split directly on frame metadata.
split_animation(animation = last_animation(), by)
The animation to extract metadata from. Defaults to the last rendered animation
An unquoted expression to be evaluated in the context of the frame metadata. The result must be of equal length to the number of frames in the animation and define a grouping
Depending on the output type of the renderer used to produce the animation. Often a list with elements referencing the chunks of the animation. that can then be saved individually.