Add frame function

Called 60 times a second.