xxxxxxxxxx
34
// An overview of the screen coordinates in p5js.
//
// This example uses a class called grid.js, which I wrote explicitly to
// help students understand how p5js orients it's canvas
//
// By Jon Froehlich
// http://makeabilitylab.io
let grid;
function setup() {
createCanvas(600, 400);
// This grid is custom code I wrote just to get you oriented
// to how the p5js canvas is setup
grid = new Grid();
grid.isCenterPtOn = true; // switch to true to draw center pt
}
function draw() {
background(10);
grid.draw();
}