title: How put over the dot a image, in a canvas?
body: <p>How can i put image in each of objects?</p>
  <p>currently only its showing dots, but i need show image</p>
  <pre><code>for (var i = 0; i &lt; objects.length; i++) {
          var object = objects[i];
          object.y += spawnRateOfDescent;
          ctx.beginPath();
          ctx.arc(object.x, object.y, 8, 0, Math.PI * 2);
  
  
         
  
  
          ctx.closePath();
          ctx.fillStyle = object.type;
          ctx.fill();
      }
  </code></pre>
  <p>I tried with this</p>
  <pre><code>var img = new Image();
      img.src = &quot;img/HannyahNED/Cohete_1&quot;+&quot;.png&quot;;
      img.onload = function () {
          ctx.drawImage(img, object.x, object.y);
      };
  </code></pre>
  <p>but does not worked</p>