title: html5 canvas object drawing
body: <p>im pretty new at canvas, but im trying to draw a falling object. First im trying to just draw an object, but its not working. How can i just draw an object (and if you could be so nice but not necessary to let me know how i can make it move)? Or what am I doing wrong here? Code:</p>
  <pre><code>let c, ctx;
  
  window.onload = function(){
      
      c = document.getElementById(&quot;boom&quot;);
      ctx = c.getContext(&quot;2d&quot;);
      c.width = window.innerwidth;
      c.height = window.innerHeight;
  
      setup();
      draw();
  };
  
  function draw(){
      //window.requestAnimationFrame(draw);
      ctx.fillStyle = &quot;rgba(0,0,0,1)&quot;;
      ctx.fillRect(0, 0, c.width, c.height);
      ctx.fillStyle = &quot;red&quot;;
      ctx.fillRect(100, 100, 100, 100);
      regen.push(new regen(this.x, this.y, this.w, this.h, this.color));
  };
  
  function setup(){
  
  }
  
  function regen(x, y, w, h, color){
      this.x = 100;
      this.y = 100;
      this.width = 20;
      this.height = 40;
      this.color = &quot;blue&quot;;
      //this.xSpeed = 4;
      //this.ySpeed = 4;
  
      this.draw = function(){
  
          //this.update = function(){
              //this.x += this.xSpeed;
              //this.y += this.ySpeed; 
          //}
      }
  }
  
  
  
  function getRndFloat(min, max) {
      return Math.random() * (max - min + 1) + min;
  }
  </code></pre>