Finish pattern matching in animator.js.