Animation library for use with HTML5 canvas