Javascript class to create animations from either image sequences or CSS maps