-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsketch.js
More file actions
36 lines (30 loc) · 670 Bytes
/
Copy pathsketch.js
File metadata and controls
36 lines (30 loc) · 670 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// new p5(); use this for using p5 js funtions outside setup and draw
var num = 0;
function setup() {
createCanvas(windowWidth, windowHeight);
background(22);
}
function draw() {
var elli = {
x: random(0, windowWidth),
y: random(0, windowHeight),
colo: random(0, 255),
r: random(0, 255),
g: random(0, 255),
b: random(0, 255),
alph: random(0, 125)
};
noStroke();
fill(elli.r, elli.g, elli.b, elli.alph);
ellipse(elli.x, elli.y, 15, 20);
rect(elli.x, elli.y, 10, 15);
num += 0.5;
while (num > 150) {
background(22);
num = 0;
}
}
// function mousePressed() {
// background(22);
// console.log('^^');
// }