// This line creates a variable that connects to the HTML document with the canvas. var b = document.getElementById("myCanvas"); // This line creates the main 2D variable "c" that will be used throughout this script var c = b.getContext("2d"); // This function is not used until Line 83 with boxes.push function Box(x, y, size, a) { // This variable is used on Line... this.x = x; // this.y = y; // this.size = size; // this.angle = a; // this.dx = 0; // this.dy = 0; // this.stroke = // function() { // c.save(); // var x = this.x + this.size / 2; // var y = this.y + this.size / 2; // c.translate(x, y); // c.rotate(this.angle); // c.strokeStyle = "#ffcd8a"; // c.strokeRect(-this.size / 2, -this.size / 2, // this.size, this.size); // c.restore(); }; } // var boxes = []; // for (var i = 1; i < 9; i = i + 1) { // var a = Math.random() * 6 - 1; // boxes.push(new Box(i * 30, i * 30, 100, a)); } // for (var i = 0; i < boxes.length; i = i + 1) { // boxes[i].stroke(); }