animated sprites and rectangle template