xxxxxxxxxx
46
function setup() {
createCanvas(400, 400);
frameRate(10);
colorMode(HSB, 1);
}
var moving = true,
locX = 0,
locY = 0;
function mousePressed() {
moving = !moving;
}
function draw() {
background(220);
if (moving) {
locX = mouseX;
locY = mouseY;
}
translate(locX, locY);
fill(color(random(), 1, 1));
// L
rect(10, 10, 10, 100);
rect(10, 100, 50, 10);
// I
rect(80, 10, 10, 100)
// L
rect(110, 10, 10, 100);
rect(110, 100, 50, 10);
// Y
rect(210, 60, 10, 50)
rect(200, 35, 10, 25)
rect(220, 35, 10, 25)
rect(190, 10, 10, 25)
rect(230, 10, 10, 25)
}