Updating timeline playback

Just as the the timeline function can accept an object of playback options as its final argument, so can the the play function and the pause function.

Passing playback options to the play and pause functions is how we can restart, reverse or seek to a specific part of an animation.

For example, this is how you would seek to 80% completion of a Timeline (which, let's assume, is assigned to the variable animation).


import { play } from 'wilderness'

play(animation, {
  initialIterations: 0.8
  iterations: 0.2
})