move requestAnimationFrame to method
initialize method
fixed  indentation and jshint error
Merge pull request #89 from tak0303/move-request-animation-frame-to-method

Move request animation frame to other method