using preloadjs for images
using requestAnimationFrame