xxxxxxxxxx
31
// Sketch is a bit bloated as I got carried away trying to make it pretty, haha.
// This is a test related to the error:
// [p5.js, line 53173] Cannot read property of undefined.
// https://github.com/processing/p5.js-web-editor/issues/3243
// Cred to Michael Odden for figuring this one out!
function setup() {
createCanvas(400, 400);
// Initialize position
pos = createVector(200, 200);
}
function draw() {
background(20);
moveObject();
drawObject();
printCoordinates();
status();
checkmarks();
}
function mousePressed() {
setup()
}