90
edits
Line 12: | Line 12: | ||
void setup() { | void setup() { | ||
size(600, 600); | |||
smooth(); | |||
} | } | ||
Line 20: | Line 20: | ||
void draw() | void draw() | ||
{ | { | ||
background(0,102,102); | |||
stroke (255); | |||
strokeWeight (1.5); | |||
noFill(); | |||
rect (30,200, 100,100); | |||
fill (150); | |||
rect (100,220, 100,100); | |||
fill (80, 100); | |||
rect (170,240, 100,100); | |||
fill (255,237, 188); | |||
rect (240,260, 100, 100); | |||
fill (167, 82, 101, 150); | |||
rect (310,280, 100, 100); | |||
fill (254, 190, 126); | |||
rect (380,300, 100,100); | |||
fill (254, 190, 126, 120); | |||
rect (450,320, 100,100); | |||
} | } | ||
Line 52: | Line 52: | ||
void setup() { | void setup() { | ||
size(900, 600); | |||
background(216,124,124); | |||
} | } | ||
void draw() { | void draw() { | ||
variableRect(mouseX, mouseY, pmouseX, pmouseY); | |||
} | } | ||
Line 68: | Line 68: | ||
void variableRect(int x, int y, int px, int py) { | void variableRect(int x, int y, int px, int py) { | ||
float speed = abs(x-px) + abs(y-py); | |||
stroke(0); | |||
fill(random(255),random(255),random(255), 190); | |||
rect(x, y, speed, speed); | |||
} | } |
edits