sprite animation framework for javascript and canvas