refactor anim using transition
fix #289
update #285