xxxxxxxxxx
38
// A simple drawing app created live with HCID521 class
//
// Try using this with the MakeCode + CPX program:
// https://makecode.com/_gfE7HFXMPJJF
//
// For a version with sound, try:
// https://editor.p5js.org/jonfroehlich/sketches/qrU2WJIzJ
//
// By Jon Froehlich
// @jonfroehlich
// http://makeabilitylab.io
//
let hueVal = 0;
function setup() {
createCanvas(800, 600);
colorMode(HSB);
noStroke();
}
function draw() {
if(mouseIsPressed == true){
fill(hueVal, 100, 100, 0.4);
circle(mouseX, mouseY, 40);
hueVal = hueVal + 1;
}
if(hueVal > 360){
hueVal = 0;
}
}
function keyPressed(){
background(0);
}