Drawing and animating

by DavisC_WL

HTML

<canvas width="500" height="500" id="myCanvas"></canvas>

CSS

#myCanvas {
    border:1px solid #000;
}

JavaScript

/*************
variables to make program work
*************/
//access the canvas
var canvas = document.getElementById('myCanvas');
//access drawing environment
var context = canvas.getContext("2d");
//create a new image
var space = new Image(flakes);
//variables for rectangles

/***********
function for drawing stuff
ALL OF YOUR CODE GOES HERE vvvv
************/
function draw() {
    //color
  //  context.fillStyle = "grey";
    //shape
   // context.fillRect(20, 20, 100, 100);
    context.drawImage(flakes,100,100, 12, 12)
    }
    flakes.src = "https://i.postimg.cc/tCZS7vRF/flakes.jpg";
/************
Call the function
************/
draw();