support promise api for anim. Fixes #496