Added duration variable to animation options

On my previous commit I forgot to add the duration variable to the animation options.