switched animate function to use requestAnimationFrame
delete old function
Merge pull request #1 from vaughankg/animate

switched animate function to use requestAnimationFrame