xxxxxxxxxx
//my sound is not working :(((((((
// function preload() {
// mySound = loadSound('Zipper.mp3');
// }
function setup() {
createCanvas(windowWidth, windowHeight);
background("#2E5894");
}
function draw() {
var speed = dist(mouseX, mouseY, random(100), random(255));
strokeWeight(speed);
fill(255,70);
stroke(255,1);
line(pmouseX, pmouseY, mouseX, mouseY);
// for (i=0, i<80, i=i+10) For function doesn't work
fill(random(255), random(255), random(255),70); //want to add i to 30, the color's opacity gets higher and goes back down
noStroke();
rectMode(CENTER);
if(mouseIsPressed) {
rect(mouseX, mouseY, speed, speed);
// mySound.play();
}
}
function keyTyped() {
if(key=='c') {
background(random(255),random(255), random(255));
thesize = 1;
}
}