anime.js: function to variable
refactoring anime function