Add draw function in animate.js