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)
// four values = red, green, blue, alpha (0-255); alpha is transparency
// 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("thistle"); // this is our background color
}
// draw runs every frame over and over and over and over and over
function draw() {
fill(255, 192, 104, 20);
stroke("blue");
ellipse(mouseX, mouseY, 80, 80); // draw an ellipse - arguments are x, y, width, height
}