use animationframe in button.js