updated animation system to cache frame dimensions