factor out code for ensuring that an animation should finish, see https://github.com/phetsims/energy-forms-and-changes/issues/401
factor out code for ensuring that an animation should finish, see https://github.com/phetsims/energy-forms-and-changes/issues/401

phetsims/energy-forms-and-changes,phetsims/energy-forms-and-changes,phetsims/energy-forms-and-changes