xxxxxxxxxx
45
lines = 10;
space = 0;
rot = 0;
count = 0;
function setup() {
createCanvas(700, 700);
background(237, 230, 216);
textFont('futura');
textStyle(BOLD);
textSize(12);
}
function draw() {
fill(237, 0, 115, 10);
if (mouseIsPressed) {
for (x = 0; x < 360; x = x + (lines)) {
push();
translate(mouseX, mouseY);
rotate(radians(x) + rot);
text("SMALL DOSES", space, 0);
pop();
}
}
}
function keyReleased() {
if (keyCode == ENTER || keyCode == RETURN) background(237, 230, 216);
if (key == '1') lines = 10;
if (key == '2') lines = 30;
if (key == 's' || key == 'S') saveCanvas();
}
function mouseReleased() {
rot = random(0, 360);
count = count + 1;
oddOrEven = (count % 2);
if (oddOrEven == 1) {
space = -90;
} else {
space = 0;
}
}