Improve dim animation