xxxxxxxxxx
// this is a comment
/* this is a comment also
but it can be
lots and lots
of lines */
// things like size and position are in pixels
// setup runs once when you hit play!
function setup() {
createCanvas(windowWidth, windowHeight); // this is saying how big our canvas is
// colors can be:
// a single value = luminosity (0-255)
// three values = red, green, blue (0-255)
// hex string, e.g. "#0000ff"
// word that matches a web color, e.g. "turquoise"
// web colors are here: https://en.wikipedia.org/wiki/Web_colors
// r g and b are because humans and vision
// see here: https://en.wikipedia.org/wiki/Trichromacy
// 0-255 is because byte: https://en.wikipedia.org/wiki/Byte
background(128, 96, 204); // this is our background color
}
// draw runs every frame over and over and over and over and over
function draw() {
ellipse(mouseX, mouseY, 20, 20); // draw an ellipse - arguments are x, y, width, height
}