// Object prototype var Ball = function() { this.x = 0; this.y =0; this.width = 50; this.height = 50; this.colour = color(0, 255, 0); }; // Create a new instance of the Ball object var myBall = new Ball(); var draw = function() { background(); fill(myBall.colour); ellipse(myBall.x, myBall.y, myBall.width, myBall.height); myBall.x = mouseX; myBall.y = mouseY; };