Code that shows my favourite kind of animation loop